From ba9ba8ffe2ba3ef84ad1ed2adc57ab91e6f8fa73 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 2 Feb 2016 11:21:29 +0100 Subject: avoid npe when accessing the pgp connection service --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 99183dff..94af846e 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -334,7 +334,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public PgpEngine getPgpEngine() { - if (pgpServiceConnection.isBound()) { + if (pgpServiceConnection != null && pgpServiceConnection.isBound()) { if (this.mPgpEngine == null) { this.mPgpEngine = new PgpEngine(new OpenPgpApi( getApplicationContext(), -- cgit v1.2.3