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