fix NPE in SimpleWorker cleanup
This commit is contained in:
parent
10a00753e7
commit
b04b5f235c
@ -43,7 +43,8 @@ public abstract class SimpleWorker<T> implements Runnable {
|
||||
mRunning = false;
|
||||
mDelayed = false;
|
||||
mWait = false;
|
||||
cleanup(mTaskTodo);
|
||||
if (mTaskTodo != null)
|
||||
cleanup(mTaskTodo);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@ -51,7 +52,7 @@ public abstract class SimpleWorker<T> implements Runnable {
|
||||
// FIXME: mTaskTodo == null?
|
||||
if (mDelayed || mTaskTodo == null) {
|
||||
|
||||
if (mDelayed)
|
||||
if (mDelayed && mTaskTodo != null)
|
||||
onMainLoop(mTaskTodo);
|
||||
|
||||
// entered on main-loop
|
||||
|
Loading…
x
Reference in New Issue
Block a user