Small improvement

This commit is contained in:
M66B 2020-03-24 14:25:39 +01:00
parent dfadba0d7e
commit 931ea6f685
1 changed files with 3 additions and 2 deletions

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 {
if (fragment.getView() != null)
run(fragment.getContext(), fragment.getViewLifecycleOwner(), args, name);
} catch (IllegalStateException ex) {
Log.w(ex);
Log.e(ex);
}
}