Extends support for uniquely identyfing objects.
[platform/upstream/at-spi2-core.git] / atspi / atspi-value.c
index fbd9573..642533d 100644 (file)
@@ -104,11 +104,19 @@ atspi_value_set_current_value (AtspiValue *obj, gdouble new_value, GError **erro
   AtspiAccessible *accessible = ATSPI_ACCESSIBLE (obj);
 
   g_return_val_if_fail (accessible != NULL, FALSE);
+
+  if (!accessible->parent.app || !accessible->parent.app->bus_name)
+{
+    g_set_error_literal (error, ATSPI_ERROR, ATSPI_ERROR_APPLICATION_GONE,
+                          _("The application no longer exists"));
+    return FALSE;
+  }
+
     message = dbus_message_new_method_call (accessible->parent.app->bus_name,
                                             accessible->parent.path,
                                             DBUS_INTERFACE_PROPERTIES, "Set");
     if (!message)
-      return NULL;
+      return FALSE;
     dbus_message_append_args (message, DBUS_TYPE_STRING, &atspi_interface_value,
                                DBUS_TYPE_STRING, &str_curval,
                               DBUS_TYPE_INVALID);