Only call terminate when worker isn't null

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-02-07 16:35:38 -08:00
parent e12461db88
commit c1203d48e2

View File

@@ -42,5 +42,5 @@ class Task
terminate: ->
unless @terminated
@terminated = true
@worker.terminate()
@worker?.terminate()
@worker = null