diff options
author | Ted Gould <ted@gould.cx> | 2011-04-05 11:33:17 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-04-05 11:33:17 -0500 |
commit | 63b367e2053977021584133f7788a1689dcfcd68 (patch) | |
tree | 4a868dce56970355cfbdbfa50e53d0745dbea09d /libdbusmenu-gtk | |
parent | 30fc6c2185d3e72cc4e797cdfcf31b13bfe36329 (diff) | |
download | libdbusmenu-63b367e2053977021584133f7788a1689dcfcd68.tar.gz libdbusmenu-63b367e2053977021584133f7788a1689dcfcd68.tar.bz2 libdbusmenu-63b367e2053977021584133f7788a1689dcfcd68.zip |
Handle the case of the variant being NULL
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index a7ba46d..512038e 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -555,7 +555,10 @@ process_toggle_state (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * varia static void process_submenu (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, DbusmenuGtkClient * gtkclient) { - const gchar * submenu = g_variant_get_string(variant, NULL); + const gchar * submenu = NULL; + if (variant != NULL) { + submenu = g_variant_get_string(variant, NULL); + } if (g_strcmp0(submenu, DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU) != 0) { /* This is the only case we're really supporting right now, |