gtk2/toolbutton-assert.patch
2009-11-02 04:22:13 +00:00

24 lines
964 B
Diff

diff -up gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert gtk+-2.18.3/gtk/gtktoolbutton.c
--- gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert 2009-10-16 10:38:56.000000000 -0400
+++ gtk+-2.18.3/gtk/gtktoolbutton.c 2009-10-26 01:12:26.146186990 -0400
@@ -916,11 +916,15 @@ gtk_tool_button_set_label (GtkToolButton
button->priv->label_text = g_strdup (label);
button->priv->contents_invalid = TRUE;
- elided_label = _gtk_toolbar_elide_underscores (label);
- accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
- atk_object_set_name (accessible, elided_label);
+ if (label)
+ {
+ elided_label = _gtk_toolbar_elide_underscores (label);
+ accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
+ atk_object_set_name (accessible, elided_label);
+
+ g_free (elided_label);
+ }
- g_free (elided_label);
g_free (old_label);
g_object_notify (G_OBJECT (button), "label");