Skip to content

Commit

Permalink
Merge pull request #2233 from aaronlehmann/spec-version-sanity
Browse files Browse the repository at this point in the history
orchestrator: Check that service's SpecVersion exists before dereferencing
  • Loading branch information
nishanttotla committed Jun 9, 2017
2 parents 43b657a + b2968a1 commit 42cab91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/orchestrator/task.go
Expand Up @@ -63,7 +63,7 @@ func IsTaskDirty(s *api.Service, t *api.Task) bool {
// If the spec version matches, we know the task is not dirty. However,
// if it does not match, that doesn't mean the task is dirty, since
// only a portion of the spec is included in the comparison.
if t.SpecVersion != nil && *s.SpecVersion == *t.SpecVersion {
if t.SpecVersion != nil && s.SpecVersion != nil && *s.SpecVersion == *t.SpecVersion {
return false
}

Expand Down

0 comments on commit 42cab91

Please sign in to comment.