From 6c835d8ab1b181f1e8b168f13bfb8b419ad4cf11 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 26 Sep 2024 07:29:46 +0200 Subject: [PATCH] Prevent NPE --- app/src/main/java/eu/faircode/email/MessageHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index c2715941b6..ac602830c2 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1142,7 +1142,7 @@ public class MessageHelper { ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME_PRIMARY, }, null, null, null)) { - if (cursor.moveToFirst()) { + if (cursor != null && cursor.moveToFirst()) { String contactId = cursor.getString(0); String display = cursor.getString(1);