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).
This commit is contained in:
Tristan Van Berkom 2010-12-17 18:15:08 +09:00
parent b11bb46a76
commit df0d61e50d

View File

@ -8481,8 +8481,8 @@ gtk_entry_set_icon_tooltip_text (GtkEntry *entry,
priv = entry->priv; priv = entry->priv;
if (!(icon_info = priv->icons[icon_pos])) if ((icon_info = priv->icons[icon_pos]) == NULL)
icon_info = priv->icons[icon_pos]; icon_info = construct_icon_info (GTK_WIDGET (entry), icon_pos);
if (icon_info->tooltip) if (icon_info->tooltip)
g_free (icon_info->tooltip); g_free (icon_info->tooltip);
@ -8561,8 +8561,8 @@ gtk_entry_set_icon_tooltip_markup (GtkEntry *entry,
priv = entry->priv; priv = entry->priv;
if (!(icon_info = priv->icons[icon_pos])) if ((icon_info = priv->icons[icon_pos]) == NULL)
icon_info = priv->icons[icon_pos]; icon_info = construct_icon_info (GTK_WIDGET (entry), icon_pos);
if (icon_info->tooltip) if (icon_info->tooltip)
g_free (icon_info->tooltip); g_free (icon_info->tooltip);