From 5043cb1dd0dbc5c9348045ed4e71b352234f0ebf Mon Sep 17 00:00:00 2001 From: 12aw Date: Wed, 6 Mar 2024 10:12:21 +0100 Subject: [PATCH] Fix formatting feature crash --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 79364826b..99d73279e 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -4790,7 +4790,7 @@ public class ConversationFragment extends XmppFragment params.height = keyboardHeight; emojipickerview.setLayoutParams(params); } - if (activity.xmppConnectionService != null && isKeyboardVisible && activity.xmppConnectionService.showTextFormatting()) { + if (activity != null && activity.xmppConnectionService != null && isKeyboardVisible && activity.xmppConnectionService.showTextFormatting()) { showTextFormat(me); } else { hideTextFormat(); @@ -4828,7 +4828,7 @@ public class ConversationFragment extends XmppFragment params.height = keyboardHeight; emojipickerview.setLayoutParams(params); } - if (activity.xmppConnectionService != null && keyboardOpen && activity.xmppConnectionService.showTextFormatting()) { + if (activity != null && activity.xmppConnectionService != null && keyboardOpen && activity.xmppConnectionService.showTextFormatting()) { showTextFormat(me); } else { hideTextFormat();