check if activity is not null before using it to paint send button

This commit is contained in:
Daniel Gultsch 2019-07-01 10:17:29 +02:00
parent 7ec8f7952f
commit 4f0214b477
1 changed files with 4 additions and 1 deletions

View File

@ -2284,7 +2284,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
status = Presence.Status.OFFLINE; status = Presence.Status.OFFLINE;
} }
this.binding.textSendButton.setTag(action); 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() { protected void updateStatusMessages() {