Skip to content

Commit

Permalink
fix crash when activity is created and there is a saved instance state
Browse files Browse the repository at this point in the history
  • Loading branch information
mathisdt committed Oct 4, 2022
1 parent ef0a7ab commit 28175c6
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ public class OptionsActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

getSupportFragmentManager()
.beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();
if (savedInstanceState == null) {
getSupportFragmentManager()
.beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();
}

ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
Expand Down

0 comments on commit 28175c6

Please sign in to comment.