summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2013-05-03 09:48:50 -0500
committerMike Gorse <mgorse@suse.com>2013-05-03 09:51:40 -0500
commit67c512ccdd517dab81821cecfb396a04dd2714ea (patch)
tree58fa2eb6b3740934b619cd2fd48f6fbdd130a4fc
parent2837d1a690253c9ccd833c294ee47aa7c572ae73 (diff)
downloadat-spi2-atk-67c512ccdd517dab81821cecfb396a04dd2714ea.tar.gz
Add a NULL check into register_reply
Register_reply could access invalid memory if it is called after atk_bridge_adaptor_cleanup() has been called. This code should probably be refactored to make the instance act as a GObject, but committing this for now to fix the crash. https://bugzilla.gnome.org/show_bug.cgi?id=699554
-rw-r--r--atk-adaptor/bridge.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 1a36f14..e59c834 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -235,6 +235,14 @@ register_reply (DBusPendingCall *pending, void *user_data)
reply = dbus_pending_call_steal_reply (pending);
dbus_pending_call_unref (pending);
+
+ if (!spi_global_app_data)
+ {
+ if (reply)
+ dbus_message_unref (reply);
+ return;
+ }
+
if (reply)
{
gchar *app_name, *obj_path;