[glib/wip/menus] Don't call g_variant_get_type on a NULL GVariant



commit 7068fdbfb5add1f88794dac3587dcafc0540c233
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Oct 30 00:04:41 2011 -0400

    Don't call g_variant_get_type on a NULL GVariant

 gio/gdbusactiongroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c
index 2557071..63ba3e4 100644
--- a/gio/gdbusactiongroup.c
+++ b/gio/gdbusactiongroup.c
@@ -199,7 +199,7 @@ g_dbus_action_group_get_state_type (GActionGroup *g_group,
       return NULL;
     }
 
-  return g_variant_get_type (info->state);
+  return info->state ? g_variant_get_type (info->state) : NULL;
 }
 
 static GVariant *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]