From c565ece411b770856d5ae11eff1929a22133367b Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com>
Date: Tue, 31 May 2016 14:44:17 -0500
Subject: 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));
}
}
--
cgit v0.12