aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-14 19:33:35 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-14 19:33:35 +0200
commit3c557a1bb409649bfa5b07cbb4f549d92e312c32 (patch)
tree85ed996831e453e855e0b84da68be4eceaae0e50 /src/eu/siacs
parent262128c8f9152330b61bc5b4358337ff2fd0fdcf (diff)
don't show invalid file size
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 028ab002..b09f97fc 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -105,7 +105,10 @@ public class MessageAdapter extends ArrayAdapter<Message> {
boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI
&& message.getMergedStatus() <= Message.STATUS_RECEIVED;
if (message.getType() == Message.TYPE_IMAGE) {
- filesize = message.getImageParams().size / 1024 + " KB";
+ ImageParams params = message.getImageParams();
+ if (params.size != 0) {
+ filesize = params.size / 1024 + " KB";
+ }
}
switch (message.getMergedStatus()) {
case Message.STATUS_WAITING: