Fix possible NPE in database migration.
This commit is contained in:
parent
553b7522aa
commit
afdf4e365f
1 changed files with 4 additions and 0 deletions
|
@ -1378,6 +1378,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper implements SignalDatab
|
||||||
byte[] reactions = cursor.getBlob(cursor.getColumnIndexOrThrow("reactions"));
|
byte[] reactions = cursor.getBlob(cursor.getColumnIndexOrThrow("reactions"));
|
||||||
long notifiedTimestamp = cursor.getLong(cursor.getColumnIndexOrThrow("notified_timestamp"));
|
long notifiedTimestamp = cursor.getLong(cursor.getColumnIndexOrThrow("notified_timestamp"));
|
||||||
|
|
||||||
|
if (reactions == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boolean hasReceiveLaterThanNotified = ReactionList.parseFrom(reactions)
|
boolean hasReceiveLaterThanNotified = ReactionList.parseFrom(reactions)
|
||||||
.getReactionsList()
|
.getReactionsList()
|
||||||
|
|
Loading…
Add table
Reference in a new issue