From 5d46f5b693d434218054b7a408c24be1d85042b2 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 2 Jul 2022 08:51:32 +0200 Subject: [PATCH] Prevent NPE --- .../main/java/eu/faircode/email/EditTextMultiAutoComplete.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java b/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java index 391713f04d..7cc7f19316 100644 --- a/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java +++ b/app/src/main/java/eu/faircode/email/EditTextMultiAutoComplete.java @@ -127,6 +127,8 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie @Override public void run() { try { + if (edit == null) + return; ClipImageSpan[] spans = edit.getSpans(backspace, backspace, ClipImageSpan.class); if (spans.length == 1) { int start = edit.getSpanStart(spans[0]);