Prevent crash

This commit is contained in:
M66B 2020-02-22 13:48:52 +01:00
parent 3f92947e56
commit 56a04294c3
1 changed files with 4 additions and 1 deletions

View File

@ -1978,8 +1978,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private boolean onReply(String action) {
if (values.containsKey("expanded") && values.get("expanded").size() > 0) {
Context context = getContext();
if (context == null)
return false;
long id = values.get("expanded").get(0);
Intent reply = new Intent(getContext(), ActivityCompose.class)
Intent reply = new Intent(context, ActivityCompose.class)
.putExtra("action", action)
.putExtra("reference", id);
startActivity(reply);