File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
android/capacitor/src/main/java/com/getcapacitor Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ public Bridge getBridge() {
6666 @ Override
6767 public void onSaveInstanceState (Bundle outState ) {
6868 super .onSaveInstanceState (outState );
69- bridge .saveInstanceState (outState );
69+ if (bridge != null ) {
70+ bridge .saveInstanceState (outState );
71+ }
7072 }
7173
7274 @ Override
@@ -82,8 +84,10 @@ public void onStart() {
8284 @ Override
8385 public void onRestart () {
8486 super .onRestart ();
85- this .bridge .onRestart ();
86- Logger .debug ("App restarted" );
87+ if (this .bridge != null ) {
88+ this .bridge .onRestart ();
89+ Logger .debug ("App restarted" );
90+ }
8791 }
8892
8993 @ Override
@@ -131,7 +135,9 @@ public void onDestroy() {
131135 @ Override
132136 public void onDetachedFromWindow () {
133137 super .onDetachedFromWindow ();
134- this .bridge .onDetachedFromWindow ();
138+ if (this .bridge != null ) {
139+ this .bridge .onDetachedFromWindow ();
140+ }
135141 }
136142
137143 /**
You can’t perform that action at this time.
0 commit comments