Protect against NPE in search.

This commit is contained in:
Greyson Parrelli
2024-08-30 12:32:21 -04:00
committed by Nicholas Tinsley
parent 85449802d1
commit 97ea5dc45e

View File

@@ -474,6 +474,14 @@ public class SearchRepository {
int messageId = CursorUtil.requireInt(cursor, SearchTable.MESSAGE_ID);
boolean isMms = CursorUtil.requireInt(cursor, SearchTable.IS_MMS) == 1;
if (body == null) {
body = "";
}
if (bodySnippet == null) {
bodySnippet = "";
}
return new MessageResult(conversationRecipient, messageRecipient, body, bodySnippet, threadId, messageId, receivedMs, isMms);
}
}