diff options
author | Michael Terry <michael.terry@canonical.com> | 2011-10-05 14:59:21 -0400 |
---|---|---|
committer | Michael Terry <michael.terry@canonical.com> | 2011-10-05 14:59:21 -0400 |
commit | fcd8e4126dea4e2fbde3a17fe842f2cd10750220 (patch) | |
tree | d092a41b2a426b159f9a458654ec8035a462eea4 | |
parent | 1e2a29f24c3f28fd4d7e22ee6f0e873fbcf47e4a (diff) | |
download | libdbusmenu-fcd8e4126dea4e2fbde3a17fe842f2cd10750220.tar.gz libdbusmenu-fcd8e4126dea4e2fbde3a17fe842f2cd10750220.tar.bz2 libdbusmenu-fcd8e4126dea4e2fbde3a17fe842f2cd10750220.zip |
when resetting an image widget and it's the only child of the menuitem, make sure we don't try to use free'd memory
-rw-r--r-- | libdbusmenu-gtk/genericmenuitem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index 5488f93..ef77a2e 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -449,6 +449,7 @@ genericmenuitem_set_image (Genericmenuitem * menu_item, GtkWidget * image) if (GTK_IS_IMAGE(child)) { /* We've got a label, let's update it. */ imagew = GTK_IMAGE(child); + child = NULL; } else if (GTK_IS_BOX(child)) { /* Look for the label in the box */ gtk_container_foreach(GTK_CONTAINER(child), set_image_helper, &imagew); |