aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/crypto/OtrEngine.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/crypto/OtrEngine.java')
-rw-r--r--src/eu/siacs/conversations/crypto/OtrEngine.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/crypto/OtrEngine.java b/src/eu/siacs/conversations/crypto/OtrEngine.java
index ca6230e1..32cd26b6 100644
--- a/src/eu/siacs/conversations/crypto/OtrEngine.java
+++ b/src/eu/siacs/conversations/crypto/OtrEngine.java
@@ -119,6 +119,9 @@ public class OtrEngine implements OtrEngineHost {
}
public PublicKey getPublicKey() {
+ if (this.keyPair == null) {
+ return null;
+ }
return this.keyPair.getPublic();
}