fix npe
This commit is contained in:
parent
abc42647ae
commit
b2556daacd
|
@ -329,7 +329,10 @@ public class ConversationsOverviewFragment extends XmppFragment {
|
|||
final MenuItem menuOngoingCall = menu.findItem(R.id.action_ongoing_call);
|
||||
final MenuItem menuTogglePinned = menu.findItem(R.id.action_toggle_pinned);
|
||||
|
||||
Conversation conversation = conversations.get(((AdapterView.AdapterContextMenuInfo) menuInfo).position);
|
||||
if (menuInfo == null) return;
|
||||
int pos = ((AdapterView.AdapterContextMenuInfo) menuInfo).position;
|
||||
if (pos < 0) return;
|
||||
Conversation conversation = conversations.get(pos);
|
||||
if (conversation != null) {
|
||||
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||
menuContactDetails.setVisible(false);
|
||||
|
|
Loading…
Reference in a new issue