diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java b/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java index 02c094b71..b3f2e64da 100644 --- a/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java +++ b/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java @@ -115,7 +115,11 @@ public class PgpDecryptionService { case OpenPgpApi.RESULT_CODE_SUCCESS: try { os.flush(); - message.setBody(os.toString()); + final String body = os.toString(); + if (body == null) { + throw new IOException("body was null"); + } + message.setBody(body); message.setEncryption(Message.ENCRYPTION_DECRYPTED); final HttpConnectionManager manager = mXmppConnectionService.getHttpConnectionManager(); if (message.trusted() |