possible null pointer fix

This commit is contained in:
Daniel Gultsch 2014-03-09 03:33:32 +01:00
parent a8dd6794f3
commit d543d377b7

View file

@ -604,10 +604,12 @@ public class ConversationFragment extends Fragment {
if (params[i].getEncryption() == Message.ENCRYPTION_PGP) { if (params[i].getEncryption() == Message.ENCRYPTION_PGP) {
String body = params[i].getBody(); String body = params[i].getBody();
String decrypted = null; String decrypted = null;
try {
if (activity==null) { if (activity==null) {
return false; return false;
} else if (!activity.xmppConnectionServiceBound) {
return false;
} }
try {
Log.d("gultsch","calling to decrypt message id #"+params[i].getUuid()); Log.d("gultsch","calling to decrypt message id #"+params[i].getUuid());
decrypted = activity.xmppConnectionService.getPgpEngine().decrypt(body); decrypted = activity.xmppConnectionService.getPgpEngine().decrypt(body);
} catch (UserInputRequiredException e) { } catch (UserInputRequiredException e) {