diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 5b9e8c04a..b6324c510 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -222,7 +222,7 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie final String errorMessage = message.getErrorMessage(); if (Message.ERROR_MESSAGE_CANCELLED.equals(errorMessage)) { info = getContext().getString(R.string.cancelled); - } else { + } else if (errorMessage != null) { final String[] errorParts = errorMessage.split("\\u001f", 2); if (errorParts.length == 2) { switch (errorParts[0]) { @@ -236,6 +236,8 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie } else { info = getContext().getString(R.string.send_failed); } + } else { + info = getContext().getString(R.string.send_failed); } error = true; break;