diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-07-17 15:45:32 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-07-17 15:45:32 +0200 |
commit | e5879a1ce8b7551e03d5527147aa906ed20a1bcb (patch) | |
tree | 9ad10374793b4b3360031c94edad5dc6a4717640 /src/main/java/eu/siacs/conversations | |
parent | f260e378c50bff21d0b887827a6befd2720ca0c9 (diff) |
avoid NPE
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java index 2bd22fd1b..72ab6db46 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java @@ -118,8 +118,10 @@ public class HttpUploadConnection implements Transferable { fail(); return; } - this.file.setExpectedSize(pair.second); - this.mFileInputStream = pair.first; + if (pair != null) { + this.file.setExpectedSize(pair.second); + this.mFileInputStream = pair.first; + } Jid host = account.getXmppConnection().findDiscoItemByFeature(Xmlns.HTTP_UPLOAD); IqPacket request = mXmppConnectionService.getIqGenerator().requestHttpUploadSlot(host,file,mime); mXmppConnectionService.sendIqPacket(account, request, new OnIqPacketReceived() { |