diff options
-rw-r--r-- | src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java b/src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java index 94e8447b..5d633e33 100644 --- a/src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java +++ b/src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java @@ -127,8 +127,10 @@ public abstract class AsyncResultProgram */ public final void onRequestEndParsePartialResult(boolean cancelled) { synchronized (this.mSync) { - this.mWorkerThread.mAlive = false; - this.mSync.notify(); + if (this.mWorkerThread != null) { + this.mWorkerThread.mAlive = false; + this.mSync.notify(); + } } try { @@ -258,8 +260,10 @@ public abstract class AsyncResultProgram //Stop the thread synchronized (this.mSync) { - this.mWorkerThread.mAlive = false; - this.mSync.notify(); + if (this.mWorkerThread != null) { + this.mWorkerThread.mAlive = false; + this.mSync.notify(); + } } //Notify cancellation @@ -285,8 +289,10 @@ public abstract class AsyncResultProgram //Stop the thread synchronized (this.mSync) { - this.mWorkerThread.mAlive = false; - this.mSync.notify(); + if (this.mWorkerThread != null) { + this.mWorkerThread.mAlive = false; + this.mSync.notify(); + } } //Notify ending |