[at-spi2-core] Fix a crash when calling an object from a disposed application
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Fix a crash when calling an object from a disposed application
- Date: Thu, 30 Dec 2010 11:37:41 +0000 (UTC)
commit 4bc6e9e267e9164545cb6c03c9ac1cbec131613f
Author: Mike Gorse <mgorse novell com>
Date: Thu Dec 30 06:33:56 2010 -0500
Fix a crash when calling an object from a disposed application
atspi/atspi-misc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index d8feb32..23e3920 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -1005,6 +1005,13 @@ _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GErro
DBusError err;
AtspiObject *aobj = ATSPI_OBJECT (obj);
+ if (!aobj->app || !aobj->app->bus)
+ {
+ g_set_error_literal (error, ATSPI_ERROR, ATSPI_ERROR_APPLICATION_GONE,
+ _("The application no longer exists"));
+ return FALSE;
+ }
+
va_start (args, type);
dbus_error_init (&err);
retval = dbind_method_call_reentrant_va (aobj->app->bus, aobj->app->bus_name,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]