Prevent crash

This commit is contained in:
M66B 2019-09-26 10:32:27 +02:00
parent f10f217d8d
commit 4f07e2e60a
1 changed files with 10 additions and 6 deletions

View File

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