add null pointer check to db migration
This commit is contained in:
parent
e2d506c96a
commit
2c4a6b0912
|
@ -312,7 +312,11 @@ public class DatabaseBackend extends SQLiteOpenHelper {
|
||||||
AxolotlAddress ownAddress = new AxolotlAddress(account.getJid().toBareJid().toString(), ownDeviceId);
|
AxolotlAddress ownAddress = new AxolotlAddress(account.getJid().toBareJid().toString(), ownDeviceId);
|
||||||
deleteSession(db, account, ownAddress);
|
deleteSession(db, account, ownAddress);
|
||||||
IdentityKeyPair identityKeyPair = loadOwnIdentityKeyPair(db, account);
|
IdentityKeyPair identityKeyPair = loadOwnIdentityKeyPair(db, account);
|
||||||
setIdentityKeyTrust(db, account, identityKeyPair.getPublicKey().getFingerprint().replaceAll("\\s", ""), XmppAxolotlSession.Trust.TRUSTED );
|
if (identityKeyPair != null) {
|
||||||
|
setIdentityKeyTrust(db, account, identityKeyPair.getPublicKey().getFingerprint().replaceAll("\\s", ""), XmppAxolotlSession.Trust.TRUSTED);
|
||||||
|
} else {
|
||||||
|
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": could not load own identity key pair");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue