Prevent crash

pull/174/head
M66B 5 years ago
parent 3f92947e56
commit 56a04294c3

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

Loading…
Cancel
Save