[at-spi2-core] Return a state set with STATE_DEFUNCT for disposed objects



commit 54c7a1bd2244fbba628e839b3bde6cf51ce35bb4
Author: Mike Gorse <mgorse novell com>
Date:   Thu Dec 30 13:08:55 2010 -0500

    Return a state set with STATE_DEFUNCT for disposed objects

 atspi/atspi-accessible.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index 3325499..ede8b87 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -619,6 +619,14 @@ atspi_accessible_get_localized_role_name (AtspiAccessible *obj, GError **error)
 AtspiStateSet *
 atspi_accessible_get_state_set (AtspiAccessible *obj)
 {
+  if (!obj->parent.app || !obj->parent.app->bus)
+  {
+    AtspiStateSet *set = atspi_state_set_new (NULL);
+    atspi_state_set_add (set, ATSPI_STATE_DEFUNCT);
+    return set;
+  }
+
+
   if (!(obj->cached_properties & ATSPI_CACHE_STATES))
   {
     DBusMessage *reply;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]