From fdc2dcd62effce445a148ed6ebfa8192cfb4fd13 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 29 Apr 2018 15:53:48 +0200 Subject: fixed npe when OS invokes StartConversationsActivity with null action --- src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/pixart/messenger/ui') diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index ae2dcf0bf..d3fedbef4 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -755,7 +755,11 @@ public class StartConversationActivity extends XmppActivity implements XmppConne return invite.invite(); } } - switch (intent.getAction()) { + final String action = intent.getAction(); + if (action == null) { + return false; + } + switch (action) { case Intent.ACTION_SENDTO: case Intent.ACTION_VIEW: Uri uri = intent.getData(); -- cgit v1.2.3