plugins/drivers: fix panic when copying a nil TaskHandle

This commit is contained in:
Michael Schurter
2018-10-17 17:14:27 -07:00
parent d71e7666bd
commit 41b40b9296

View File

@@ -29,6 +29,10 @@ func (h *TaskHandle) GetDriverState(v interface{}) error {
}
func (h *TaskHandle) Copy() *TaskHandle {
if h == nil {
return nil
}
handle := new(TaskHandle)
*handle = *h
handle.Config = h.Config.Copy()