catch npe on participants context menu

This commit is contained in:
Daniel Gultsch 2019-08-14 17:04:31 +02:00
parent 6e1394ab40
commit e735be323e
2 changed files with 6 additions and 0 deletions

View File

@ -257,6 +257,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
@Override
public boolean onContextItemSelected(MenuItem item) {
final User user = mUserPreviewAdapter.getSelectedUser();
if (user == null) {
Toast.makeText(this, R.string.unable_to_perform_this_action, Toast.LENGTH_SHORT).show();
return true;
}
if (!MucDetailsContextMenuHelper.onContextItemSelected(item, mUserPreviewAdapter.getSelectedUser(), this)) {
return super.onContextItemSelected(item);
}

View File

@ -875,4 +875,5 @@
<string name="not_a_backup_file">The file you selected is not a Conversations backup file</string>
<string name="account_already_setup">This account has already been setup</string>
<string name="please_enter_password">Please enter the password for this account</string>
<string name="unable_to_perform_this_action">Unable to perform this action</string>
</resources>