Do not return NULL AtkStateSet

https://bugzilla.gnome.org/show_bug.cgi?id=741511
This commit is contained in:
Peter Bloomfield 2015-02-28 08:59:12 -05:00 committed by Matthias Clasen
parent 2a3f1a49de
commit 5611cf2096

View File

@ -97,11 +97,14 @@ gtk_text_view_accessible_ref_state_set (AtkObject *accessible)
AtkStateSet *state_set;
GtkWidget *widget;
state_set = ATK_OBJECT_CLASS (gtk_text_view_accessible_parent_class)->ref_state_set (accessible);
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (widget == NULL)
return NULL;
state_set = ATK_OBJECT_CLASS (gtk_text_view_accessible_parent_class)->ref_state_set (accessible);
{
atk_state_set_add_state (state_set, ATK_STATE_DEFUNCT);
return state_set;
}
if (gtk_text_view_get_editable (GTK_TEXT_VIEW (widget)))
atk_state_set_add_state (state_set, ATK_STATE_EDITABLE);