From df0d61e50da88ff90740ce6605d43d4062a54e57 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 17 Dec 2010 18:15:08 +0900 Subject: [PATCH] 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). --- gtk/gtkentry.c | 8 ++++---- 1 file 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);