aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-09-05 18:47:37 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-09-05 18:47:37 +0200
commit2c4a6b09127c8e6776020cd90c782ab950a70324 (patch)
treeb073b612daff3c020134e72ecf19a40d3a5b892a /src/main/java/eu/siacs
parente2d506c96a0a72b7a903d28d9b3a858430700266 (diff)
add null pointer check to db migration
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
index 44063a54..d420c1cd 100644
--- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
@@ -312,7 +312,11 @@ public class DatabaseBackend extends SQLiteOpenHelper {
AxolotlAddress ownAddress = new AxolotlAddress(account.getJid().toBareJid().toString(), ownDeviceId);
deleteSession(db, account, ownAddress);
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");
+ }
}
}
}