From 6c91ca7d3a75534449941188a519167f2dd417c2 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Sun, 13 Mar 2016 20:40:44 +0000 Subject: [PATCH] Check logged-in state before manipulating the search menu Thanks @raicabogdan. Fixes #6. --- app/src/main/java/com/zulip/android/ZulipActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/zulip/android/ZulipActivity.java b/app/src/main/java/com/zulip/android/ZulipActivity.java index 0dc64d441bc1f8..cdf1f9ac46eb2f 100644 --- a/app/src/main/java/com/zulip/android/ZulipActivity.java +++ b/app/src/main/java/com/zulip/android/ZulipActivity.java @@ -452,7 +452,7 @@ public boolean onPrepareOptionsMenu(Menu menu) { inflater.inflate(R.menu.options, menu); } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + if (this.logged_in && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // Get the SearchView and set the searchable configuration SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); final MenuItem searchMenuItem = menu.findItem(R.id.search);