Selaa lähdekoodia

Fix NPE when activity is relaunched on changing font size of the phone (#2319)

Varun Gupta 7 vuotta sitten
vanhempi
commit
ff3c6a8415

+ 3
- 1
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java Näytä tiedosto

63
     @Override
63
     @Override
64
     protected void onCreate(Bundle savedInstanceState) {
64
     protected void onCreate(Bundle savedInstanceState) {
65
         super.onCreate(savedInstanceState);
65
         super.onCreate(savedInstanceState);
66
-        if (!NavigationApplication.instance.getReactGateway().hasStartedCreatingContext()) {
66
+         if (!NavigationApplication.instance.getReactGateway().hasStartedCreatingContext() || 
67
+                getIntent() == null || 
68
+                getIntent().getBundleExtra("ACTIVITY_PARAMS_BUNDLE") == null) {
67
             SplashActivity.start(this);
69
             SplashActivity.start(this);
68
             finish();
70
             finish();
69
             return;
71
             return;