[java-atk-wrapper: 1/2] Check against ref_selection returning null
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper: 1/2] Check against ref_selection returning null
- Date: Wed, 1 May 2019 22:16:32 +0000 (UTC)
commit 63f6f754e4b10ae7986497973fcf67eeff6b34a1
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Mon Apr 1 23:43:38 2019 +0200
Check against ref_selection returning null
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=793544
jni/src/jawselection.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/jni/src/jawselection.c b/jni/src/jawselection.c
index 1573cd2..a56ced2 100644
--- a/jni/src/jawselection.c
+++ b/jni/src/jawselection.c
@@ -129,6 +129,10 @@ jaw_selection_ref_selection (AtkSelection *selection, gint i)
jclass classAtkSelection = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkSelection");
jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkSelection, "ref_selection",
"(I)Ljavax/accessibility/Accessible;");
jobject jchild = (*jniEnv)->CallObjectMethod(jniEnv, atk_selection, jmid, (jint)i);
+
+ if (!jchild) {
+ return NULL;
+ }
jclass classAccessible = (*jniEnv)->FindClass( jniEnv, "javax/accessibility/Accessible" );
jmid = (*jniEnv)->GetMethodID( jniEnv, classAccessible, "getAccessibleContext",
"()Ljavax/accessibility/AccessibleContext;" );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]