Called method on wrong object in Android exception handler.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 01 Sep 2011 04:42:09 -0400
changeset 5860b89f7f3bc9be
parent 5859 db254478ed2d
child 5861 b781fa6468aa
Called method on wrong object in Android exception handler.

Fixes Bugzilla #1297.

Thanks to jon @ rafkind for the patch!
src/core/android/SDL_android.cpp
     1.1 --- a/src/core/android/SDL_android.cpp	Thu Sep 01 04:34:05 2011 -0400
     1.2 +++ b/src/core/android/SDL_android.cpp	Thu Sep 01 04:42:09 2011 -0400
     1.3 @@ -277,7 +277,7 @@
     1.4          const char* exceptionNameUTF8 = mEnv->GetStringUTFChars(exceptionName, 0);
     1.5  
     1.6          mid = mEnv->GetMethodID(exceptionClass, "getMessage", "()Ljava/lang/String;");
     1.7 -        jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exceptionClass, mid);
     1.8 +        jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exception, mid);
     1.9  
    1.10          if (exceptionMessage != NULL) {
    1.11              const char* exceptionMessageUTF8 = mEnv->GetStringUTFChars(