[at-spi2-core/gnome-3-20] atspi_accessible_clear_cache: don't crash if we have no children
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core/gnome-3-20] atspi_accessible_clear_cache: don't crash if we have no children
- Date: Tue, 31 May 2016 19:45:24 +0000 (UTC)
commit c565ece411b770856d5ae11eff1929a22133367b
Author: Mike Gorse <mgorse suse com>
Date: Tue May 31 14:44:17 2016 -0500
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 files 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));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]