summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-03-05 21:36:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-03-05 21:36:03 +0000
commit20cafaeefcdfe301a27d2cf90fad7424620e22a2 (patch)
tree5fff29c15d3594e5b8cf17eac4f7b07a05bb02af /gtk/gtkbutton.c
parent9958ce70c5936224d1485809bd2bdc235cb41b43 (diff)
downloadgtk+-20cafaeefcdfe301a27d2cf90fad7424620e22a2.tar.gz
Don't let the priv->image pointer dangle. (#136259, Padraig O'Briain)
Fri Mar 5 22:37:15 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkbutton.c (gtk_button_construct_child): Don't let the priv->image pointer dangle. (#136259, Padraig O'Briain)
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r--gtk/gtkbutton.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 6a0869068f..84ea2bb562 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -586,8 +586,11 @@ gtk_button_construct_child (GtkButton *button)
return;
if (GTK_BIN (button)->child)
- gtk_container_remove (GTK_CONTAINER (button),
- GTK_BIN (button)->child);
+ {
+ gtk_container_remove (GTK_CONTAINER (button),
+ GTK_BIN (button)->child);
+ priv->image = NULL;
+ }
if (button->use_stock &&
gtk_stock_lookup (button->label_text, &item))