Skip to content

Commit

Permalink
worker: Check OSBuildOutput for nil before using it
Browse files Browse the repository at this point in the history
It is possible for it to end up as nil so it needs to be checked
everywhere it is used.
  • Loading branch information
bcl authored and teg committed Jun 12, 2020
1 parent 4958d15 commit 4f3f09f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/worker/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (s *Server) JobStatus(id uuid.UUID) (*JobStatus, error) {
if canceled {
state = common.CFailed
} else if !finished.IsZero() {
if result.OSBuildOutput.Success {
if result.OSBuildOutput != nil && result.OSBuildOutput.Success {
state = common.CFinished
} else {
state = common.CFailed
Expand Down

0 comments on commit 4f3f09f

Please sign in to comment.