Prevent crash

pull/162/head
M66B 5 years ago
parent f10f217d8d
commit 4f07e2e60a

@ -778,12 +778,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
protected void onExecuted(Bundle args, EntityFolder drafts) { protected void onExecuted(Bundle args, EntityFolder drafts) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext()); if (drafts == null)
lbm.sendBroadcast( Snackbar.make(view, R.string.title_no_primary_drafts, Snackbar.LENGTH_LONG).show();
new Intent(ActivityView.ACTION_VIEW_MESSAGES) else {
.putExtra("account", drafts.account) LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
.putExtra("folder", drafts.id) lbm.sendBroadcast(
.putExtra("type", drafts.type)); new Intent(ActivityView.ACTION_VIEW_MESSAGES)
.putExtra("account", drafts.account)
.putExtra("folder", drafts.id)
.putExtra("type", drafts.type));
}
} }
@Override @Override

Loading…
Cancel
Save