From 5622ba5a3759ada8ea6b4edfee4a21bfbb0275c3 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 1 Oct 2021 13:10:55 +0200 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 14efc142ef..6d6b7bcc38 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -5304,6 +5304,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private void updateDebugInfo() { + if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) + return; + Runtime rt = Runtime.getRuntime(); long hused = rt.totalMemory() - rt.freeMemory(); long hmax = rt.maxMemory();