st-widget: Fix a potentially infinite recursion
Commit ffe4eaf00d
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:
@@ -2785,7 +2785,7 @@ static AtkRole
|
|||||||
st_widget_accessible_get_role (AtkObject *obj)
|
st_widget_accessible_get_role (AtkObject *obj)
|
||||||
{
|
{
|
||||||
StWidget *widget = NULL;
|
StWidget *widget = NULL;
|
||||||
AtkRole role;
|
StWidgetPrivate *priv;
|
||||||
|
|
||||||
g_return_val_if_fail (ST_IS_WIDGET_ACCESSIBLE (obj), ATK_ROLE_INVALID);
|
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)
|
if (widget == NULL)
|
||||||
return ATK_ROLE_INVALID;
|
return ATK_ROLE_INVALID;
|
||||||
|
|
||||||
role = st_widget_get_accessible_role (widget);
|
priv = st_widget_get_instance_private (widget);
|
||||||
if (role != ATK_ROLE_INVALID)
|
if (priv->accessible_role != ATK_ROLE_INVALID)
|
||||||
return role;
|
return priv->accessible_role;
|
||||||
|
|
||||||
return ATK_OBJECT_CLASS (st_widget_accessible_parent_class)->get_role (obj);
|
return ATK_OBJECT_CLASS (st_widget_accessible_parent_class)->get_role (obj);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user