mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 10:48:34 +00:00
Fix crash in SmsMigrator.
This commit is contained in:
parent
d7395af774
commit
84012c7adb
@ -183,9 +183,10 @@ public class SmsMigrator {
|
||||
statement = ourSmsDatabase.createInsertStatement(transaction);
|
||||
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
int addressColumn = cursor.getColumnIndexOrThrow(SystemColumns.ADDRESS);
|
||||
int typeColumn = cursor.getColumnIndex(SmsDatabase.TYPE);
|
||||
|
||||
if (cursor.isNull(typeColumn) || isAppropriateTypeForMigration(cursor, typeColumn)) {
|
||||
if (!cursor.isNull(addressColumn) && (cursor.isNull(typeColumn) || isAppropriateTypeForMigration(cursor, typeColumn))) {
|
||||
getContentValuesForRow(context, cursor, ourThreadId, statement);
|
||||
statement.execute();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user