From 3cebed3db50dd6325c725d87a6ec5eabc21d2ba3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Feb 2011 22:33:02 -0600 Subject: Making sure the root isn't NULL before continuing --- tests/test-glib-layout-client.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index 5ea0cf8..3afe042 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -81,6 +81,11 @@ layout_updated (DbusmenuClient * client, gpointer data) g_debug("Layout Updated"); DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(client); + if (menuroot == NULL) { + g_debug("Root NULL, waiting"); + return; + } + layout_t * layout = &layouts[layouton]; if (!verify_root_to_layout(menuroot, layout)) { -- cgit v1.2.3 From e1094452eda0314065bb1b02d616d573c0367a74 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 15 Feb 2011 11:50:54 -0600 Subject: Don't unref the variant as we don't really have a ref to it, it's still floating --- tests/json-loader.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/json-loader.c b/tests/json-loader.c index 14e90e0..36157dc 100644 --- a/tests/json-loader.c +++ b/tests/json-loader.c @@ -109,7 +109,6 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node) if (variant != NULL) { dbusmenu_menuitem_property_set_variant(mi, member, variant); - g_variant_unref(variant); } } -- cgit v1.2.3