Skip to content

Commit 6a582ae

Browse files
author
Artur Chrusciel
committed
isFinishing check just before dismiss
1 parent b76c5b8 commit 6a582ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/org/devio/rn/splashscreen/SplashScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ public static void hide(Activity activity) {
7878
_activity.runOnUiThread(new Runnable() {
7979
@Override
8080
public void run() {
81-
if (mSplashDialog != null && mSplashDialog.isShowing() && !_activity.isFinishing()) {
81+
if (mSplashDialog != null && mSplashDialog.isShowing()) {
8282
boolean isDestroyed = false;
8383

8484
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
8585
isDestroyed = _activity.isDestroyed();
8686
}
8787

88-
if (!isDestroyed) {
88+
if (!_activity.isFinishing() && !isDestroyed) {
8989
mSplashDialog.dismiss();
9090
}
9191
mSplashDialog = null;

0 commit comments

Comments
 (0)