diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-12-16 00:39:45 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-12-16 00:39:45 +0100 |
commit | 556697c47e74766215c17fb5f721d71494a02643 (patch) | |
tree | 557fd93828e929eec272b131c9fc4bffb5f225bf | |
parent | dcf951e48e81dd03a7909fb1ddb404ca46a0d00c (diff) |
Fixes FS#95: NPE when opening message details for failed file transfer
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java index 56297f6c..63ed8dc7 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java @@ -54,6 +54,7 @@ public class MessageDetailsDialog extends AbstractAlertDialog { */ protected void displayFileInfo(View view, Message message) { if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getTransferable() != null) { + Logging.d("messagedetailsfile", "File is stored in path: " + message.getRelativeFilePath()); view.findViewById(R.id.dlgMsgDetFileTable).setVisibility(View.VISIBLE); if (null != message.getFileParams()) { Message.FileParams params = message.getFileParams(); @@ -139,7 +140,7 @@ public class MessageDetailsDialog extends AbstractAlertDialog { // Get own resource name -> What about msg written on other client? String me = conversation.getAccount().getJid().getResourcepart(); // Get resource name of chat partner, if available - String other = (message.getCounterpart().isBareJid()) ? "" : message.getCounterpart().getResourcepart(); + String other = (null == message.getCounterpart() || message.getCounterpart().isBareJid()) ? "" : message.getCounterpart().getResourcepart(); Logging.d("MesageDialog", "Me: " + me + ", other: " + other); TextView sender = (TextView) view.findViewById(R.id.dlgMsgDetSender); TextView receipient = (TextView) view.findViewById(R.id.dlgMsgDetReceipient); |