diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-09-07 13:31:24 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-09-07 13:31:24 +0200 |
commit | 88cdd03f0f56dc6ed51e18b9d66cdf22e4603dd8 (patch) | |
tree | c3173b0781118c1a03d56afa95cdae35f6c48757 /src/main/java | |
parent | bf64276fa7af1ee6f80e9e4eb6e77eff2fe5db6d (diff) |
catch npe in setupIme method
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
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()) { |