mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 14:08:33 +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);
|
statement = ourSmsDatabase.createInsertStatement(transaction);
|
||||||
|
|
||||||
while (cursor != null && cursor.moveToNext()) {
|
while (cursor != null && cursor.moveToNext()) {
|
||||||
int typeColumn = cursor.getColumnIndex(SmsDatabase.TYPE);
|
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);
|
getContentValuesForRow(context, cursor, ourThreadId, statement);
|
||||||
statement.execute();
|
statement.execute();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user