mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Android: Fix a possible crash when main recreates
This commit is contained in:
parent
1a63edec27
commit
3bc34d40a1
|
@ -41,6 +41,10 @@ public class AndroidHostInterface {
|
|||
}
|
||||
}
|
||||
|
||||
public void setContext(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
static public native String getScmVersion();
|
||||
|
||||
static public native String getFullScmVersion();
|
||||
|
|
|
@ -175,6 +175,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
throw new RuntimeException("Failed to create host interface");
|
||||
}
|
||||
|
||||
AndroidHostInterface.getInstance().setContext(this);
|
||||
mGameList.refresh(false, false, this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue