diff options
author | Mike Gorse <mgorse@suse.com> | 2016-05-31 14:44:17 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2016-05-31 14:46:11 -0500 |
commit | cdb353694464aeb1686fa7a559db38945aa28eee (patch) | |
tree | 5328f4a688de54328e1e2b05a889b7ca7b92bbbd | |
parent | 777f9ae44cffe8b0abc98d64278ed1ea77d3dd93 (diff) | |
download | at-spi2-core-cdb353694464aeb1686fa7a559db38945aa28eee.tar.gz |
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
-rw-r--r-- | atspi/atspi-accessible.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index ceaedb57..4547ef7f 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)); } } |