mirror of https://github.com/axmolengine/axmol.git
wrong variable used which could crash the whole app
This commit is contained in:
parent
635f394e93
commit
09543a0aac
|
@ -254,13 +254,13 @@ namespace cocos2d {
|
|||
}
|
||||
|
||||
JNIEnv *pEnv = JniHelper::getEnv();
|
||||
if (!env) {
|
||||
if (!pEnv) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* chars = env->GetStringUTFChars(jstr, NULL);
|
||||
const char* chars = pEnv->GetStringUTFChars(jstr, NULL);
|
||||
std::string ret(chars);
|
||||
env->ReleaseStringUTFChars(jstr, chars);
|
||||
pEnv->ReleaseStringUTFChars(jstr, chars);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue