diff options
author | Ted Gould <ted@gould.cx> | 2011-01-18 10:47:32 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-18 10:47:32 -0600 |
commit | 6cb4e78579f4d202ca797dfbc9a998e1cc58186a (patch) | |
tree | c178c0cd75d5910e47939c09161055d0552c49f8 /libdbusmenu-glib | |
parent | 74ccb9b179c63ae79719b480247bb844326ab675 (diff) | |
download | libdbusmenu-6cb4e78579f4d202ca797dfbc9a998e1cc58186a.tar.gz libdbusmenu-6cb4e78579f4d202ca797dfbc9a998e1cc58186a.tar.bz2 libdbusmenu-6cb4e78579f4d202ca797dfbc9a998e1cc58186a.zip |
Warn when can't parse.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/server.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |