[java-atk-wrapper] Restore check against null parent
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Restore check against null parent
- Date: Mon, 17 Jun 2019 20:14:54 +0000 (UTC)
commit 91c7b9ec4130923de530b185a9c5844891eba2ec
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Mon Jun 17 22:14:43 2019 +0200
Restore check against null parent
jni/src/jawobject.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index 02dbe7e..fad4176 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -212,9 +212,13 @@ jaw_object_get_parent(AtkObject *atk_obj)
jobject jparent = (*jniEnv)->CallStaticObjectMethod (jniEnv, atkObject, jmid, ac);
(*jniEnv)->DeleteGlobalRef (jniEnv, ac);
- AtkObject *parent_obj = (AtkObject*) jaw_object_table_lookup (jniEnv, jparent);
- if (parent_obj != NULL )
- return parent_obj;
+ if (jparent != NULL)
+ {
+ AtkObject *parent_obj = (AtkObject*) jaw_object_table_lookup (jniEnv, jparent);
+
+ if (parent_obj != NULL )
+ return parent_obj;
+ }
// FIXME: Should we rather return null?
return ATK_OBJECT(atk_get_root());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]