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.
This commit is contained in:
Matthias Clasen 2013-05-25 23:07:03 -04:00
parent 0b167b0ae9
commit b382c6f633

View File

@ -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;