Skip to content

Commit

Permalink
Handle nil TaskInfo in task.Wait callback (#665)
Browse files Browse the repository at this point in the history
Property collector returns nil when it cannot find the task, handle
that case in the Error method which gets called by callback. Otherwise
we panic.

Towards vmware/vic#3868
  • Loading branch information
caglar10ur authored Feb 16, 2017
1 parent f3cf126 commit f1f5b6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion task/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (t taskProgress) Detail() string {
}

func (t taskProgress) Error() error {
if t.info.Error != nil {
if t.info != nil && t.info.Error != nil {
return Error{t.info.Error}
}

Expand Down

0 comments on commit f1f5b6c

Please sign in to comment.