mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
dfadba0d7e
commit
931ea6f685
|
@ -84,9 +84,10 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
||||||
|
|
||||||
public void execute(final Fragment fragment, @NonNull Bundle args, @NonNull String name) {
|
public void execute(final Fragment fragment, @NonNull Bundle args, @NonNull String name) {
|
||||||
try {
|
try {
|
||||||
|
if (fragment.getView() != null)
|
||||||
run(fragment.getContext(), fragment.getViewLifecycleOwner(), args, name);
|
run(fragment.getContext(), fragment.getViewLifecycleOwner(), args, name);
|
||||||
} catch (IllegalStateException ex) {
|
} catch (IllegalStateException ex) {
|
||||||
Log.w(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue