diff --git a/cocos2dx/platform/android/jni/JniHelper.cpp b/cocos2dx/platform/android/jni/JniHelper.cpp index 8d5e6cdc07..a4e6db6e4d 100644 --- a/cocos2dx/platform/android/jni/JniHelper.cpp +++ b/cocos2dx/platform/android/jni/JniHelper.cpp @@ -159,6 +159,11 @@ extern "C" static string jstring2string_(jstring jstr) { + if (jstr == NULL) + { + return ""; + } + JNIEnv *env = 0; if (! getEnv(&env))