From 1dcafe01df35516b903f24033fa49cd2b6119b8b Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 28 Apr 2022 17:44:33 +0200 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/ActivityView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 9a330ffe4d..cdac3cc1db 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -1254,6 +1254,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB @Override public void onBackStackChanged() { + if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) + return; + int count = getSupportFragmentManager().getBackStackEntryCount(); if (count == 0) finish();