diff options
author | Mike Gorse <mgorse@suse.com> | 2014-01-16 13:46:12 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2014-01-16 13:46:12 -0600 |
commit | 2554a07c0bbee7defef5b2fca3a420d6cf42a770 (patch) | |
tree | c7f6395175174a56b1d5b8c0a669e067b581b08b /atspi/atspi-accessible.c | |
parent | 8651e188bcad751ec7231c2eab5679378976293c (diff) | |
download | at-spi2-core-2554a07c0bbee7defef5b2fca3a420d6cf42a770.tar.gz |
Fix crash when get_process_id called with an app no longer on the bus
Diffstat (limited to 'atspi/atspi-accessible.c')
-rw-r--r-- | atspi/atspi-accessible.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index 95ac311a..b06a36c9 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -1626,8 +1626,12 @@ atspi_accessible_get_process_id (AtspiAccessible *accessible, GError **error) dbus_error_init (&d_error); reply = dbus_connection_send_with_reply_and_block (bus, message, -1, &d_error); dbus_message_unref (message); - dbus_message_get_args (reply, NULL, DBUS_TYPE_UINT32, &pid, DBUS_TYPE_INVALID); - dbus_message_unref (reply); + if (reply) + { + if (!strcmp (dbus_message_get_signature (reply), "u")) + dbus_message_get_args (reply, NULL, DBUS_TYPE_UINT32, &pid, DBUS_TYPE_INVALID); + dbus_message_unref (reply); + } if (dbus_error_is_set (&d_error)) { g_warning ("GetConnectionUnixProcessID failed: %s", d_error.message); |