Called method on wrong object in Android exception handler.

Fixes Bugzilla #1297.

Thanks to jon @ rafkind for the patch!
This commit is contained in:
Ryan C. Gordon 2011-09-01 04:42:09 -04:00
parent af022f47ed
commit a622e7c305

View file

@ -277,7 +277,7 @@ static bool Android_JNI_ExceptionOccurred()
const char* exceptionNameUTF8 = mEnv->GetStringUTFChars(exceptionName, 0);
mid = mEnv->GetMethodID(exceptionClass, "getMessage", "()Ljava/lang/String;");
jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exceptionClass, mid);
jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exception, mid);
if (exceptionMessage != NULL) {
const char* exceptionMessageUTF8 = mEnv->GetStringUTFChars(