aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-09 03:33:32 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-09 03:33:32 +0100
commitd543d377b713db99aab1f03f5e45c8b46b4b4fa0 (patch)
tree78dc3eb80e99ad8e5b8cf921a7f820996f81f84a
parenta8dd6794f3abc846c9209706a60c32c13d067ba3 (diff)
possible null pointer fix
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 62755c6c..5c552b42 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -604,10 +604,12 @@ public class ConversationFragment extends Fragment {
if (params[i].getEncryption() == Message.ENCRYPTION_PGP) {
String body = params[i].getBody();
String decrypted = null;
+ if (activity==null) {
+ return false;
+ } else if (!activity.xmppConnectionServiceBound) {
+ return false;
+ }
try {
- if (activity==null) {
- return false;
- }
Log.d("gultsch","calling to decrypt message id #"+params[i].getUuid());
decrypted = activity.xmppConnectionService.getPgpEngine().decrypt(body);
} catch (UserInputRequiredException e) {