Skip to content

Commit

Permalink
Android: Fixed invalid JNIEnv* pointer when starting up love.filesyst…
Browse files Browse the repository at this point in the history
…em for 2nd time.
  • Loading branch information
MikuAuahDark committed Nov 15, 2023
1 parent ae465f8 commit 81393b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/common/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,9 @@ const char *getCRequirePath()

const char *getArg0()
{
static PHYSFS_AndroidInit androidInit = {
SDL_AndroidGetJNIEnv(),
SDL_AndroidGetActivity()
};
static PHYSFS_AndroidInit androidInit = {nullptr, nullptr};
androidInit.jnienv = SDL_AndroidGetJNIEnv();
androidInit.context = SDL_AndroidGetActivity();
return (const char *) &androidInit;
}

Expand Down

0 comments on commit 81393b9

Please sign in to comment.