a11y: Avoid a warning

The listbox row accessible code was giving warnings when
parent is NULL, at destruction time.
This commit is contained in:
Matthias Clasen 2014-05-05 18:16:55 -04:00
parent b9f91bcd8c
commit 22ab2ca2a5

View File

@ -50,7 +50,8 @@ gtk_list_box_row_accessible_ref_state_set (AtkObject *obj)
if (widget != NULL)
{
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);
if (gtk_list_box_row_is_selected (GTK_LIST_BOX_ROW (widget)))