[gtk+/gtk-3-12] a11y: Avoid a warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-12] a11y: Avoid a warning
- Date: Mon, 12 May 2014 12:39:36 +0000 (UTC)
commit e8cccbb55c83dfb01ae768a44fc40b638d8d59a4
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 5 18:16:55 2014 -0400
a11y: Avoid a warning
The listbox row accessible code was giving warnings when
parent is NULL, at destruction time.
gtk/a11y/gtklistboxrowaccessible.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/a11y/gtklistboxrowaccessible.c b/gtk/a11y/gtklistboxrowaccessible.c
index 36e84a7..2fd548a 100644
--- a/gtk/a11y/gtklistboxrowaccessible.c
+++ b/gtk/a11y/gtklistboxrowaccessible.c
@@ -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 (widget == (GtkWidget*)gtk_list_box_get_selected_row (GTK_LIST_BOX (parent)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]