Merge "Add atspi_accessible_get_default_label_info" into tizen_4.0 accepted/tizen/4.0/unified/20170929.075914 submit/tizen_4.0/20170928.043352 tizen_4.0.IoT.p1_release
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 27 Sep 2017 01:57:49 +0000 (01:57 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 27 Sep 2017 01:57:49 +0000 (01:57 +0000)
atspi/atspi-accessible.c
atspi/atspi-misc.c

index cb329dc..6612a21 100644 (file)
@@ -346,7 +346,12 @@ atspi_accessible_get_navigable_at_point (AtspiAccessible *root,
   g_return_val_if_fail (root != NULL, NULL);
   do {
     reply = _atspi_dbus_call_partial (root, atspi_interface_accessible, "GetNavigableAtPoint", error, "iiu", d_x, d_y, d_ctype);
-
+    // call failed, error is set, so we bail out
+    if (!reply) {
+      if (deputy) g_object_unref(deputy);
+      if (return_value) g_object_unref(return_value);
+      return NULL;
+    }
     _ATSPI_DBUS_CHECK_SIG (reply, "(so)y(so)", NULL, NULL);
 
     dbus_message_iter_init (reply, &iter);
@@ -664,6 +669,8 @@ atspi_accessible_get_neighbor (AtspiAccessible *root,
   while(1) {
     const char *path = are_objects_on_the_same_bus(root, start) ? root_path : "";
     DBusMessage *reply = _atspi_dbus_call_partial (start, atspi_interface_accessible, "GetNeighbor", error, "sii", path, (int)direction, (int)search_mode);
+    // call failed, error is set, so we bail out
+    if (!reply) break;
 
     _ATSPI_DBUS_CHECK_SIG (reply, "(so)y", error, NULL);
     dbus_message_iter_init (reply, &iter);
@@ -732,7 +739,6 @@ atspi_accessible_get_neighbor (AtspiAccessible *root,
 
     // nothing found
     g_object_unref(start);
-    return_value = NULL;
     break;
   }
   while(!g_queue_is_empty(children_root_stack))
index 02eab8c..5895935 100644 (file)
@@ -1153,6 +1153,7 @@ out:
     dbus_error_free (&err);
     if (reply)
       dbus_message_unref(reply);
+    return NULL;
   }
   else if (reply && dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
   {