Calls to atk_object_ref_state_set() are expected to return a valid
state set always, so it would be better if this implementation of
socket's ref_state_set() returned empty sets instead of just NULL, to
avoid calling to atk_state_set_*() functions over invalid instances of
AtkStateSet (e.g. add_pending_items() in accessible-cache.c).
https://bugs.freedesktop.org/show_bug.cgi?id=42350
DBusMessageIter iter, iter_array;
AtkStateSet *set;
DBusMessageIter iter, iter_array;
AtkStateSet *set;
+ set = atk_state_set_new ();
+
if (!socket->embedded_plug_id)
if (!socket->embedded_plug_id)
child_name = g_strdup (socket->embedded_plug_id);
if (!child_name)
child_name = g_strdup (socket->embedded_plug_id);
if (!child_name)
child_path = g_utf8_strchr (child_name + 1, -1, ':');
if (!child_path)
{
g_free (child_name);
child_path = g_utf8_strchr (child_name + 1, -1, ':');
if (!child_path)
{
g_free (child_name);
}
*(child_path++) = '\0';
message = dbus_message_new_method_call (child_name, child_path, ATSPI_DBUS_INTERFACE_ACCESSIBLE, "GetState");
}
*(child_path++) = '\0';
message = dbus_message_new_method_call (child_name, child_path, ATSPI_DBUS_INTERFACE_ACCESSIBLE, "GetState");
reply = dbus_connection_send_with_reply_and_block (spi_global_app_data->bus, message, 1, NULL);
dbus_message_unref (message);
if (reply == NULL)
reply = dbus_connection_send_with_reply_and_block (spi_global_app_data->bus, message, 1, NULL);
dbus_message_unref (message);
if (reply == NULL)
if (strcmp (dbus_message_get_signature (reply), "au") != 0)
{
dbus_message_unref (reply);
if (strcmp (dbus_message_get_signature (reply), "au") != 0)
{
dbus_message_unref (reply);
- set = atk_state_set_new ();
- if (!set)
- return NULL;
dbus_message_iter_init (reply, &iter);
dbus_message_iter_recurse (&iter, &iter_array);
do
dbus_message_iter_init (reply, &iter);
dbus_message_iter_recurse (&iter, &iter_array);
do