[gtk/wip/chergert/fix-a11y-critical] a11y: return -1 if parent is NULL
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/fix-a11y-critical] a11y: return -1 if parent is NULL
- Date: Fri, 19 Nov 2021 19:59:56 +0000 (UTC)
commit 22847563cecb59c6f120a08bb49284599dbb6232
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 19 11:59:29 2021 -0800
a11y: return -1 if parent is NULL
gtk/a11y/gtkatspicontext.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index b6bd77b694..43d40ee257 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -334,6 +334,9 @@ get_index_in_parent (GtkWidget *widget)
GtkWidget *child;
int idx;
+ if (parent == NULL)
+ return -1;
+
idx = 0;
for (child = gtk_widget_get_first_child (parent);
child;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]