From afdf4e365fac98b5c319880ea005f231fcb44a99 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Wed, 5 May 2021 17:56:06 -0400 Subject: [PATCH] Fix possible NPE in database migration. --- .../securesms/database/helpers/SQLCipherOpenHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java index ab9bda104b..510cf08296 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java @@ -1378,6 +1378,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper implements SignalDatab byte[] reactions = cursor.getBlob(cursor.getColumnIndexOrThrow("reactions")); long notifiedTimestamp = cursor.getLong(cursor.getColumnIndexOrThrow("notified_timestamp")); + if (reactions == null) { + continue; + } + try { boolean hasReceiveLaterThanNotified = ReactionList.parseFrom(reactions) .getReactionsList()