If atk_object_ref_accessible_child returns NULL when creating the cache,
then don't attempt to process/unref the NULL item, although applications
probably shouldn't be returning NULL in response to a call to
atk_object_ref_accessible_child, so it seems debatable whether we should
be printing a warning here.
AtkObject *child;
child = atk_object_ref_accessible_child (obj, i);
AtkObject *child;
child = atk_object_ref_accessible_child (obj, i);
- spi_object_append_reference (&iter_sub_array, child);
- g_object_unref (G_OBJECT (child));
+ if (child)
+ {
+ spi_object_append_reference (&iter_sub_array, child);
+ g_object_unref (G_OBJECT (child));
+ }
}
}
if (ATK_IS_SOCKET (obj) && atk_socket_is_occupied (ATK_SOCKET (obj)))
}
}
if (ATK_IS_SOCKET (obj) && atk_socket_is_occupied (ATK_SOCKET (obj)))