[gnome-shell] st-widget: Avoid passing NULL to atk_object_get_role()
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-widget: Avoid passing NULL to atk_object_get_role()
- Date: Thu, 21 Jan 2016 17:19:36 +0000 (UTC)
commit c25c143b245a5ee63656bec75e04a7829b3dd54c
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Jan 21 16:44:18 2016 +0100
st-widget: Avoid passing NULL to atk_object_get_role()
This never worked since the code landed but apparently no-one noticed
until now.
The intent here is to return the accessible's default role if none has
been explicitly set on the StWidget instance.
https://bugzilla.gnome.org/show_bug.cgi?id=760945
src/st/st-widget.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 0f1a34e..e20c845 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -2420,7 +2420,6 @@ AtkRole
st_widget_get_accessible_role (StWidget *widget)
{
StWidgetPrivate *priv;
- AtkObject *accessible = NULL;
AtkRole role = ATK_ROLE_INVALID;
g_return_val_if_fail (ST_IS_WIDGET (widget), ATK_ROLE_INVALID);
@@ -2430,7 +2429,7 @@ st_widget_get_accessible_role (StWidget *widget)
if (priv->accessible_role != ATK_ROLE_INVALID)
role = priv->accessible_role;
else if (priv->accessible != NULL)
- role = atk_object_get_role (accessible);
+ role = atk_object_get_role (priv->accessible);
return role;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]