From 88cdd03f0f56dc6ed51e18b9d66cdf22e4603dd8 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 7 Sep 2015 13:31:24 +0200 Subject: catch npe in setupIme method --- src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 4 +++- 1 file changed, 3 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 1a01c3da..73087b7a 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -348,7 +348,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa } public void setupIme() { - if (activity.usingEnterKey() && activity.enterIsSend()) { + if (activity == null) { + return; + } else if (activity.usingEnterKey() && activity.enterIsSend()) { mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE)); mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE)); } else if (activity.usingEnterKey()) { -- cgit v1.2.3