diff options
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() { |