From 6cb4e78579f4d202ca797dfbc9a998e1cc58186a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 18 Jan 2011 10:47:32 -0600 Subject: Warn when can't parse. --- libdbusmenu-glib/server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 75a305c..6be2a60 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -1009,7 +1009,13 @@ bus_get_children (DbusmenuServer * server, GVariant * params, GDBusMethodInvocat ret = g_variant_new("(a(ia{svg}))", g_variant_builder_end(&builder)); } else { - ret = g_variant_parse(g_variant_type_new("(a(ia{sv}))"), "([(0, {})],)", NULL, NULL, NULL); + GError * error = NULL; + ret = g_variant_parse(g_variant_type_new("(a(ia{sv}))"), "([(0, {})],)", NULL, NULL, &error); + if (error != NULL) { + g_warning("Unable to parse '([(0, {})],)' as a '(a(ia{sv}))': %s", error->message); + g_error_free(error); + ret = NULL; + } } g_dbus_method_invocation_return_value(invocation, ret); -- cgit v1.2.3