From e605be140dfc165029c9230c65a8e3a15fa15aa0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 2 Oct 2009 08:52:39 -0500 Subject: We weren't checking to see if error wasn't null, and therefore we reacted on a bad hashtable which caused a crash. --- libdbusmenu-glib/client.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index e2679e1..f1504b7 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -565,6 +565,10 @@ get_properties_helper (gpointer key, gpointer value, gpointer data) static void menuitem_get_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data) { + if (error != NULL) { + g_warning("Error getting properties on a menuitem: %s", error->message); + return; + } g_hash_table_foreach(properties, get_properties_helper, data); g_hash_table_destroy(properties); return; @@ -575,6 +579,10 @@ menuitem_get_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError static void menuitem_get_properties_new_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data) { + if (error != NULL) { + g_warning("Error getting properties on a new menuitem: %s", error->message); + return; + } g_return_if_fail(data != NULL); newItemPropData * propdata = (newItemPropData *)data; -- cgit v1.2.3