mirror of https://github.com/axmolengine/axmol.git
fixed #1236: return empty string when parameter is null
This commit is contained in:
parent
1d18c6607a
commit
683c91bbfa
|
@ -159,6 +159,11 @@ extern "C"
|
||||||
|
|
||||||
static string jstring2string_(jstring jstr)
|
static string jstring2string_(jstring jstr)
|
||||||
{
|
{
|
||||||
|
if (jstr == NULL)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
JNIEnv *env = 0;
|
JNIEnv *env = 0;
|
||||||
|
|
||||||
if (! getEnv(&env))
|
if (! getEnv(&env))
|
||||||
|
|
Loading…
Reference in New Issue