diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index 5d345c0f4bf..454c682b609 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -1361,7 +1361,12 @@ func appendTaskEvent(state *structs.TaskState, event *structs.TaskEvent, capacit } func (tr *TaskRunner) TaskExecHandler() drivermanager.TaskExecHandler { - return tr.getDriverHandle().ExecStreaming + // Check it is running + handle := tr.getDriverHandle() + if handle == nil { + return nil + } + return handle.ExecStreaming } func (tr *TaskRunner) DriverCapabilities() (*drivers.Capabilities, error) {