diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-07-03 11:38:29 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-07-03 11:38:29 +0200 |
commit | 7d55a62328bce9edb9aca9d7b19bbcd24dc22b22 (patch) | |
tree | 552e60541f9c7b53b5d9f1eb87e1988a386a3f39 /src/main/java/de/pixart | |
parent | e8a4eaf8cd6e6ab3a5b0198060ff968f171d53d9 (diff) |
check if activity is not null before using it to paint send button
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
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() { |