From ee7faec82b5e138279a81cde4b60351b7577bc63 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 15 Jan 2022 17:20:24 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/SimpleTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/SimpleTask.java b/app/src/main/java/eu/faircode/email/SimpleTask.java index 1ee5ae3e35..873480a06d 100644 --- a/app/src/main/java/eu/faircode/email/SimpleTask.java +++ b/app/src/main/java/eu/faircode/email/SimpleTask.java @@ -171,7 +171,8 @@ public abstract class SimpleTask implements LifecycleObserver { Log.e(ex); this.ex = ex; } finally { - wl.release(); + if (wl.isHeld()) + wl.release(); } // Run on UI thread