fixed #1236: return empty string when parameter is null

This commit is contained in:
minggo 2012-05-16 14:17:37 +08:00
parent 1d18c6607a
commit 683c91bbfa
1 changed files with 5 additions and 0 deletions

View File

@ -159,6 +159,11 @@ extern "C"
static string jstring2string_(jstring jstr)
{
if (jstr == NULL)
{
return "";
}
JNIEnv *env = 0;
if (! getEnv(&env))