Fix possible NPE in database migration.

This commit is contained in:
Greyson Parrelli 2021-05-05 17:56:06 -04:00
parent 553b7522aa
commit afdf4e365f

View file

@ -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()