Added failsafe

pull/182/head
M66B 5 years ago
parent 3d5d4c1f68
commit afe4650e65

@ -4651,11 +4651,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
protected void onExecuted(Bundle args, final ArrayList<MessageTarget> result) { protected void onExecuted(Bundle args, final ArrayList<MessageTarget> result) {
ActivityView activity = (ActivityView) getActivity(); FragmentActivity factivity = getActivity();
if (activity == null) { if (!(factivity instanceof ActivityView)) {
Log.e("Undo: activity missing"); Log.e("Undo: activity missing");
return; return;
} }
ActivityView activity = (ActivityView) factivity;
View content = activity.getContentView(); View content = activity.getContentView();
if (content == null) { if (content == null) {
Log.e("Undo: view missing"); Log.e("Undo: view missing");

Loading…
Cancel
Save