diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-11-02 15:21:26 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-11-02 15:21:26 +0100 |
commit | 2c004857f622249a8326c97991418accb2475cf9 (patch) | |
tree | b26063a5b1b772fa28346192c8918509783e8f33 | |
parent | 544c5b4a21c44e9730a81e57fed139dca22d2615 (diff) |
handle file attachment when missing connection
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 85be017a..bf9bcd37 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -64,6 +64,7 @@ import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate; import eu.siacs.conversations.ui.adapter.ConversationAdapter; import eu.siacs.conversations.utils.ExceptionHelper; import eu.siacs.conversations.xmpp.OnUpdateBlocklist; +import eu.siacs.conversations.xmpp.XmppConnection; import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; @@ -1446,7 +1447,8 @@ public class ConversationActivity extends XmppActivity } private long getMaxHttpUploadSize(Conversation conversation) { - return conversation.getAccount().getXmppConnection().getFeatures().getMaxHttpUploadSize(); + final XmppConnection connection = conversation.getAccount().getXmppConnection(); + return connection == null ? -1 : connection.getFeatures().getMaxHttpUploadSize(); } private void setNeverAskForBatteryOptimizationsAgain() { |