Check that message is non-NULL before calling libdbus
authorMike Gorse <mgorse@suse.com>
Tue, 15 Jan 2013 16:07:12 +0000 (10:07 -0600)
committerMike Gorse <mgorse@suse.com>
Tue, 15 Jan 2013 16:07:12 +0000 (10:07 -0600)
_atspi_dbus_call_partial now checks for an error message, but it should
first check that the message is not NULL, or libdbus will abort.

atspi/atspi-misc.c

index e4ef09f..471d6a1 100644 (file)
@@ -1174,7 +1174,7 @@ out:
     dbus_error_free (&err);
   }
 
-  if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
+  if (reply && dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
   {
     const char *err_str = NULL;
     dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &err_str, DBUS_TYPE_INVALID);