Ver código fonte

Fixed JStringToString with null string.

Mark Sibly 8 anos atrás
pai
commit
b9c77ff109
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      modules/jni/native/jni_glue.cpp

+ 2 - 0
modules/jni/native/jni_glue.cpp

@@ -94,6 +94,8 @@ namespace bbJNI{
 	
 	bbString JStringToString( JNIEnv *env,jstring jstr ){
 	
+		if( !jstr ) return "";
+	
 		const char *cstr=env->GetStringUTFChars( jstr,0 );
 		
 		bbString str=bbString::fromCString( cstr );