st-widget: Fix a potentially infinite recursion
Commit ffe4eaf00d8780bdc6fb3d7aca3eda847e887007 changed this code to call st_widget_get_accessible_role() instead of using the value directly which would be an infinite recursion if that function didn't have a bug. As it is, this just resulted in CRITICAL **: atk_object_get_role: assertion 'ATK_IS_OBJECT (accessible)' failed https://bugzilla.gnome.org/show_bug.cgi?id=760945
This commit is contained in:
parent
f9258bb5e3
commit
b87da87252
@ -2785,7 +2785,7 @@ static AtkRole
|
||||
st_widget_accessible_get_role (AtkObject *obj)
|
||||
{
|
||||
StWidget *widget = NULL;
|
||||
AtkRole role;
|
||||
StWidgetPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (ST_IS_WIDGET_ACCESSIBLE (obj), ATK_ROLE_INVALID);
|
||||
|
||||
@ -2794,9 +2794,9 @@ st_widget_accessible_get_role (AtkObject *obj)
|
||||
if (widget == NULL)
|
||||
return ATK_ROLE_INVALID;
|
||||
|
||||
role = st_widget_get_accessible_role (widget);
|
||||
if (role != ATK_ROLE_INVALID)
|
||||
return role;
|
||||
priv = st_widget_get_instance_private (widget);
|
||||
if (priv->accessible_role != ATK_ROLE_INVALID)
|
||||
return priv->accessible_role;
|
||||
|
||||
return ATK_OBJECT_CLASS (st_widget_accessible_parent_class)->get_role (obj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user