src/core/android/SDL_android.c
changeset 9870 6dd5ab47534b
parent 9869 4ba43d626c4a
child 9873 b0f121cfa074
     1.1 --- a/src/core/android/SDL_android.c	Thu Sep 17 22:24:54 2015 +0200
     1.2 +++ b/src/core/android/SDL_android.c	Thu Sep 17 22:30:24 2015 +0200
     1.3 @@ -790,7 +790,10 @@
     1.4                  "openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
     1.5              inputStream = (*mEnv)->CallObjectMethod(mEnv, context, mid, fileNameJString);
     1.6  
     1.7 -            if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
     1.8 +            /* Exception is checked first because it always needs to be cleared.
     1.9 +             * If no exception occurred then the last SDL error message is kept.
    1.10 +             */
    1.11 +            if (Android_JNI_ExceptionOccurred(SDL_FALSE) || !inputStream) {
    1.12                  goto failure;
    1.13              }
    1.14          }