1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Small improvement

This commit is contained in:
M66B 2020-03-24 14:25:39 +01:00
parent dfadba0d7e
commit 931ea6f685

View file

@ -84,9 +84,10 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
public void execute(final Fragment fragment, @NonNull Bundle args, @NonNull String name) {
try {
run(fragment.getContext(), fragment.getViewLifecycleOwner(), args, name);
if (fragment.getView() != null)
run(fragment.getContext(), fragment.getViewLifecycleOwner(), args, name);
} catch (IllegalStateException ex) {
Log.w(ex);
Log.e(ex);
}
}