summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2016-07-05 04:41:46 +0900
committervolzhs <volzhs@gmail.com>2016-07-05 04:41:46 +0900
commitb09dbaa78e716078806fdf1f88dea279d7d3c257 (patch)
treede84072368eb64cffa081bf66726035d700b2bb5 /platform
parent716dfa67a3c5a0a38205179c01676e05a718d244 (diff)
Fix crash when null value through jni on android
Diffstat (limited to 'platform')
-rw-r--r--platform/android/java_glue.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 3ea2ab1641..45d02876ba 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -238,6 +238,10 @@ String _get_class_name(JNIEnv * env, jclass cls, bool* array) {
Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
+ if (obj == NULL) {
+ return Variant();
+ }
+
jclass c = env->GetObjectClass(obj);
bool array;
String name = _get_class_name(env, c, &array);