Skip to content

Commit

Permalink
Skip creating navigator in case isFinishing in onCreate, handle missi…
Browse files Browse the repository at this point in the history
…ng navigator in onDestroy (#6292)

closes #6281
  • Loading branch information
JK0N authored Jun 10, 2020
1 parent bf6a99d commit 5c6ccd1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isFinishing()) {
return;
}
addDefaultSplashLayout();
navigator = new Navigator(this,
new ChildControllersRegistry(),
Expand Down Expand Up @@ -72,7 +75,9 @@ protected void onPause() {
@Override
protected void onDestroy() {
super.onDestroy();
navigator.destroy();
if (navigator != null) {
navigator.destroy();
}
getReactGateway().onActivityDestroyed(this);
}

Expand Down

0 comments on commit 5c6ccd1

Please sign in to comment.