From baed05fbeaa30d4e3b82581388a22cc75bf9a311 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 25 May 2013 23:07:03 -0400 Subject: [PATCH] Avoid a segfault in gdbus tool When the interface name is invalid, we don't get an error back from g_dbus_connection_call_sync. --- gio/gdbus-tool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c index bd71d1e..90addfe 100644 --- a/gio/gdbus-tool.c +++ b/gio/gdbus-tool.c @@ -1017,8 +1017,11 @@ handle_call (gint *argc, &error); if (result == NULL) { - g_printerr (_("Error: %s\n"), error->message); - g_error_free (error); + if (error) + { + g_printerr (_("Error: %s\n"), error->message); + g_error_free (error); + } if (in_signature_types != NULL) { GString *s; -- 2.7.4