diff options
author | Ted Gould <ted@canonical.com> | 2009-10-02 08:52:39 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-02 08:52:39 -0500 |
commit | e605be140dfc165029c9230c65a8e3a15fa15aa0 (patch) | |
tree | 9a44c942dfca6c786a5844a3edbfb51b22bc5024 /libdbusmenu-glib | |
parent | 57af9b640d4808ba6abac152eebcc675dba04b4f (diff) | |
download | libdbusmenu-e605be140dfc165029c9230c65a8e3a15fa15aa0.tar.gz libdbusmenu-e605be140dfc165029c9230c65a8e3a15fa15aa0.tar.bz2 libdbusmenu-e605be140dfc165029c9230c65a8e3a15fa15aa0.zip |
We weren't checking to see if error wasn't null, and therefore we reacted on a bad hashtable which caused a crash.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |