aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-05 11:33:17 -0500
committerTed Gould <ted@gould.cx>2011-04-05 11:33:17 -0500
commit63b367e2053977021584133f7788a1689dcfcd68 (patch)
tree4a868dce56970355cfbdbfa50e53d0745dbea09d /libdbusmenu-gtk
parent30fc6c2185d3e72cc4e797cdfcf31b13bfe36329 (diff)
downloadlibdbusmenu-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.c5
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,