static char *
impl_get_role_str (void *datum)
{
- g_assert (ATK_IS_OBJECT (datum));
+ g_return_val_if_fail (ATK_IS_OBJECT (datum), g_strdup (""));
return g_strdup_printf ("%d",
spi_accessible_role_from_atk_role
(atk_object_get_role ((AtkObject *) datum)));
deregister_accessible (gpointer data, GObject *accessible)
{
guint ref;
- g_assert (ATK_IS_OBJECT (accessible));
+ g_return_if_fail (ATK_IS_OBJECT (accessible));
ref = object_to_ref (ATK_OBJECT(accessible));
if (ref != 0)
register_accessible (AtkObject *accessible)
{
guint ref;
- g_assert(ATK_IS_OBJECT(accessible));
+ g_return_if_fail (ATK_IS_OBJECT(accessible));
ref = assign_reference();
update_accessible (AtkObject *accessible)
{
guint ref = 0;
- g_assert(ATK_IS_OBJECT(accessible));
+ g_return_if_fail (ATK_IS_OBJECT(accessible));
ref = object_to_ref (accessible);
if (ref)
guint index;
void *data;
- g_assert (path);
+ g_return_val_if_fail (path, NULL);
if (strncmp(path, SPI_ATK_OBJECT_PATH_PREFIX, SPI_ATK_PATH_PREFIX_LENGTH) != 0)
return NULL;
* have their signals processed.
*/
accessible = g_value_get_object (¶m_values[0]);
- g_assert (ATK_IS_OBJECT (accessible));
+ g_return_val_if_fail (ATK_IS_OBJECT (accessible), TRUE);
if (object_to_ref (accessible))
{
* have their signals processed.
*/
accessible = g_value_get_object (¶m_values[0]);
- g_assert (ATK_IS_OBJECT (accessible));
+ g_return_val_if_fail (ATK_IS_OBJECT (accessible), TRUE);
if (object_to_ref (accessible))
{
atk_adaptor_app_data = g_new0 (SpiAppData, 1);
atk_misc = atk_misc_get_instance ();
atk_adaptor_app_data->root = atk_get_root();
+ if (!atk_adaptor_app_data->root)
+ g_warning("AT-SPI Root accessible is NULL");
/* Set up D-Bus connection and register bus name */
dbus_error_init (&error);
/*static char *
impl_get_nSelectedChildren_str (void *datum)
{
- g_assert (ATK_IS_HYPERLINK (datum));
+ g_return_val_if_fail (ATK_IS_SELECTION (user_data), FALSE);
return g_strdup_printf ("%d",
atk_selection_get_selection_count ((AtkSelection *)
datum));