a11y: Avoid a warning
The listbox row accessible code was giving warnings when parent is NULL, at destruction time.
This commit is contained in:
@ -50,7 +50,8 @@ gtk_list_box_row_accessible_ref_state_set (AtkObject *obj)
|
|||||||
if (widget != NULL)
|
if (widget != NULL)
|
||||||
{
|
{
|
||||||
parent = gtk_widget_get_parent (widget);
|
parent = gtk_widget_get_parent (widget);
|
||||||
if (gtk_list_box_get_selection_mode (GTK_LIST_BOX (parent)) != GTK_SELECTION_NONE)
|
if (parent != NULL &&
|
||||||
|
gtk_list_box_get_selection_mode (GTK_LIST_BOX (parent)) != GTK_SELECTION_NONE)
|
||||||
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
|
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
|
||||||
|
|
||||||
if (gtk_list_box_row_is_selected (GTK_LIST_BOX_ROW (widget)))
|
if (gtk_list_box_row_is_selected (GTK_LIST_BOX_ROW (widget)))
|
||||||
|
|||||||
Reference in New Issue
Block a user