From eb6d6669fc1f1b20bf3b718e88d1799d766e51eb Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Fri, 13 Dec 2013 09:29:58 -0600 Subject: Check to ensure the property isn't set to NULL --- libdbusmenu-gtk/parser.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index c9ec931..461927f 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -1313,8 +1313,12 @@ widget_notify_cb (GtkWidget * widget, GParamSpec * pspec, gpointer data) if (item != NULL) { GtkWidget * menu = GTK_WIDGET (g_value_get_object (&prop_value)); - parse_menu_structure_helper(menu, &recurse); - watch_submenu(item, menu); + /* Ensure the submenu isn't being set to NULL to remove it + * (ex. Geany does this) */ + if (menu != NULL) { + parse_menu_structure_helper(menu, &recurse); + watch_submenu(item, menu); + } } else { /* Note: it would be really odd that we wouldn't have a cached item, but we should handle that appropriately. */ -- cgit v1.2.3