{
AtspiStateSet *node_state_set = atspi_accessible_get_state_set(node);
GArray *states = atspi_state_set_get_states(node_state_set);
- if (!states) return NULL;
+ if (!states) {
+ g_clear_object(&node_state_set);
+ return NULL;
+ }
g_array_sort(states, _int_sort_function);
AtspiStateType state_type;
}
g_array_free(states, 0);
- g_object_unref(node_state_set);
+ g_clear_object(&node_state_set);
_truncate_string(state_string, length_limit);
unique_id, (uintptr_t)eo_ptr,
node_role_name,
attributes,
- box_size->x,
- box_size->y,
- box_size->width,
- box_size->height,
+ box_size ? box_size->x : "nil",
+ box_size ? box_size->y : "nil",
+ box_size ? box_size->width : "nil",
+ box_size ? box_size->height : "nil",
node_name,
states,
current_node_has_relations ? "*" : "");
free(box_size);
}
free(states);
- g_array_free(relations, TRUE);
+ if (relations)
+ g_array_free(relations, TRUE);
return g_strdup(result);
}
printf("\n");
_print_horizontal_line_in_relations_table();
- g_array_free(relations, TRUE);
+ if (relations)
+ g_array_free(relations, TRUE);
}
typedef void (*print_information_about_object_function)(AtspiAccessible *);