From ca59ef2da84ff7d58ed916a43eab1f7f7d91dea6 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 7 May 2021 10:17:56 -0400 Subject: [PATCH] Fix the other 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 30342c58a0..d2dc34327f 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 @@ -1350,6 +1350,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()