From 4f0214b47707f823377ce7eb24472a6cd330b5e7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 1 Jul 2019 10:17:29 +0200 Subject: [PATCH] check if activity is not null before using it to paint send button --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 92ce0c9c6..3b4842437 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2284,7 +2284,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke status = Presence.Status.OFFLINE; } this.binding.textSendButton.setTag(action); - this.binding.textSendButton.setImageResource(SendButtonTool.getSendButtonImageResource(getActivity(), action, status)); + final Activity activity = getActivity(); + if (activity != null) { + this.binding.textSendButton.setImageResource(SendButtonTool.getSendButtonImageResource(activity, action, status)); + } } protected void updateStatusMessages() {