From cdb353694464aeb1686fa7a559db38945aa28eee Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Tue, 31 May 2016 14:44:17 -0500 Subject: [PATCH] atspi_accessible_clear_cache: don't crash if we have no children If an accessible is disposed, then its list of children may be NULL. https://bugzilla.gnome.org/show_bug.cgi?id=767075 --- atspi/atspi-accessible.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index ceaedb5..4547ef7 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -1634,8 +1634,9 @@ atspi_accessible_clear_cache (AtspiAccessible *obj) if (obj) { obj->cached_properties = ATSPI_CACHE_NONE; - for (i = 0; i < obj->children->len; i++) - atspi_accessible_clear_cache (g_ptr_array_index (obj->children, i)); + if (obj->children) + for (i = 0; i < obj->children->len; i++) + atspi_accessible_clear_cache (g_ptr_array_index (obj->children, i)); } } -- 2.7.4