Fix possible NPE in conversation menu.

Would occur if someone had previously muted a conversation with
themselves.
This commit is contained in:
Greyson Parrelli 2019-02-16 11:45:06 -08:00
parent d0b763c16e
commit 5c0e1100ed

View File

@ -658,7 +658,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (isSecureText) menu.findItem(R.id.menu_call_secure).setVisible(false); if (isSecureText) menu.findItem(R.id.menu_call_secure).setVisible(false);
else menu.findItem(R.id.menu_call_insecure).setVisible(false); else menu.findItem(R.id.menu_call_insecure).setVisible(false);
menu.findItem(R.id.menu_mute_notifications).setVisible(false); MenuItem muteItem = menu.findItem(R.id.menu_mute_notifications);
if (muteItem != null) {
muteItem.setVisible(false);
}
} }
searchViewItem = menu.findItem(R.id.menu_search); searchViewItem = menu.findItem(R.id.menu_search);