Skip to content

Commit

Permalink
Android: Added check if Java method for APK expansion file exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwiesemann committed Sep 18, 2015
1 parent 4036454 commit efad04c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/android/SDL_android.c
Expand Up @@ -788,6 +788,10 @@ static int Internal_Android_JNI_FileOpen(SDL_RWops* ctx)
/* Try fallback to APK expansion files */
mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
"openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
if (!mid) {
SDL_SetError("No openAPKExpansionInputStream() in Java class");
goto failure; /* Java class is missing the required method */
}
inputStream = (*mEnv)->CallObjectMethod(mEnv, context, mid, fileNameJString);

/* Exception is checked first because it always needs to be cleared.
Expand Down

0 comments on commit efad04c

Please sign in to comment.