android: MainActivity: Fix a nullptr exception with onSaveInstanceState.
This commit is contained in:
parent
ae7fc8fb2f
commit
0589915fe6
@ -83,6 +83,12 @@ public final class MainActivity extends AppCompatActivity implements MainView {
|
|||||||
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
if (PermissionsHandler.hasWriteAccess(this)) {
|
if (PermissionsHandler.hasWriteAccess(this)) {
|
||||||
|
if (getSupportFragmentManager() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (outState == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
getSupportFragmentManager().putFragment(outState, "mPlatformGamesFragment", mPlatformGamesFragment);
|
getSupportFragmentManager().putFragment(outState, "mPlatformGamesFragment", mPlatformGamesFragment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user