[glib] Avoid a segfault in gdbus tool
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Avoid a segfault in gdbus tool
- Date: Sun, 26 May 2013 03:15:42 +0000 (UTC)
commit b382c6f63339397c338aa68ad939894665368ada
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 25 23:07:03 2013 -0400
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 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c
index 01a6c68..2714dd7 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]