Skip to content

Commit 66e7f1a

Browse files
check fragment state before displaying the next screen
1 parent 973cf06 commit 66e7f1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rave_android/src/main/java/com/flutterwave/raveandroid/sabankaccount/SaBankAccountFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ public void showPollingIndicator(boolean active) {
137137
@Override
138138
public void showWebView(String authUrl, String flwRef){
139139
this.flwRef = flwRef;
140-
new RaveVerificationUtils(this, ravePayInitializer.isStaging(), ravePayInitializer.getPublicKey(), ravePayInitializer.getTheme())
141-
.showWebpageVerificationScreen(authUrl);
140+
if (isAdded()){
141+
new RaveVerificationUtils(this, ravePayInitializer.isStaging(), ravePayInitializer.getPublicKey(), ravePayInitializer.getTheme())
142+
.showWebpageVerificationScreen(authUrl);
143+
}
142144
}
143145

144146
@Override

0 commit comments

Comments
 (0)