Android: Fix a possible crash when main recreates
This commit is contained in:
1 parent
1a63edec27
commit
3bc34d40a1
2 files changed
+5
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user