mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
ec040aae7b
commit
545f9dace5
|
@ -325,9 +325,13 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
||||||
|
|
||||||
int executing = getCount();
|
int executing = getCount();
|
||||||
Log.i("Remaining tasks=" + executing + "/" + tasks.size());
|
Log.i("Remaining tasks=" + executing + "/" + tasks.size());
|
||||||
|
if (context == null)
|
||||||
|
Log.e("Context is null");
|
||||||
|
else {
|
||||||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
||||||
lbm.sendBroadcast(new Intent(ACTION_TASK_COUNT).putExtra("count", executing));
|
lbm.sendBroadcast(new Intent(ACTION_TASK_COUNT).putExtra("count", executing));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void onPreExecute(Bundle args) {
|
protected void onPreExecute(Bundle args) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue