Return a state set with STATE_DEFUNCT for disposed objects
authorMike Gorse <mgorse@novell.com>
Thu, 30 Dec 2010 18:08:55 +0000 (13:08 -0500)
committerMike Gorse <mgorse@novell.com>
Thu, 30 Dec 2010 18:08:55 +0000 (13:08 -0500)
atspi/atspi-accessible.c

index 3325499..ede8b87 100644 (file)
@@ -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;