From 7d55a62328bce9edb9aca9d7b19bbcd24dc22b22 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Wed, 3 Jul 2019 11:38:29 +0200 Subject: check if activity is not null before using it to paint send button --- src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 04b52adc3..3b7afef25 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2586,7 +2586,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() { -- cgit v1.2.3