From a909e1a7cfb335e0cda8a106b498389f1edc355b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 22 May 2019 17:29:27 +0200 Subject: [PATCH] fixed NPE in channel discovery after race to create menu --- .../eu/siacs/conversations/ui/ChannelDiscoveryActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java index aabd6607f..ab5b66b10 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java @@ -94,7 +94,7 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O mMenuSearchView.expandActionView(); mSearchEditText.append(initialSearchValue); mSearchEditText.requestFocus(); - if (optedIn) { + if (optedIn && xmppConnectionService != null) { xmppConnectionService.discoverChannels(initialSearchValue, this); } }