Prevent crash

This commit is contained in:
M66B 2019-01-23 19:32:37 +00:00
parent cb68ddb269
commit a37298d7cc
1 changed files with 5 additions and 1 deletions

View File

@ -1014,7 +1014,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
cursor.close();
}
context.startActivity(edit);
PackageManager pm = context.getPackageManager();
if (edit.resolveActivity(pm) == null)
Toast.makeText(context, R.string.title_no_contacts, Toast.LENGTH_LONG).show();
else
context.startActivity(edit);
}
}