diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-17 18:15:08 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-17 18:15:08 +0900 |
commit | df0d61e50da88ff90740ce6605d43d4062a54e57 (patch) | |
tree | af1d9fda243439f336d2ec5cfbb38f0744b9f8a6 /gtk/gtkentry.c | |
parent | b11bb46a76e4c54099eba019e7a3310f25af80a3 (diff) | |
download | gtk+-df0d61e50da88ff90740ce6605d43d4062a54e57.tar.gz |
Fixed gtk_entry_set_icon_tooltip_text & markup to not crash
Setting this property before the icon is actually set was
resulting in a crash (found by way of Glade bug 606103).
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r-- | gtk/gtkentry.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 8463311fc0..9efabbd0a4 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -8481,8 +8481,8 @@ gtk_entry_set_icon_tooltip_text (GtkEntry *entry, priv = entry->priv; - if (!(icon_info = priv->icons[icon_pos])) - icon_info = priv->icons[icon_pos]; + if ((icon_info = priv->icons[icon_pos]) == NULL) + icon_info = construct_icon_info (GTK_WIDGET (entry), icon_pos); if (icon_info->tooltip) g_free (icon_info->tooltip); @@ -8561,8 +8561,8 @@ gtk_entry_set_icon_tooltip_markup (GtkEntry *entry, priv = entry->priv; - if (!(icon_info = priv->icons[icon_pos])) - icon_info = priv->icons[icon_pos]; + if ((icon_info = priv->icons[icon_pos]) == NULL) + icon_info = construct_icon_info (GTK_WIDGET (entry), icon_pos); if (icon_info->tooltip) g_free (icon_info->tooltip); |