[gtk+] a11y: Avoid a warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Avoid a warning
- Date: Mon, 5 May 2014 23:46:41 +0000 (UTC)
commit 22ab2ca2a520fbed07063b4368a7b6cfadf91746
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 d6812df..13831ae 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 (gtk_list_box_row_is_selected (GTK_LIST_BOX_ROW (widget)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]