diff --git a/CHANGELOG.md b/CHANGELOG.md index 7814a2cd0254..7be81bad3535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ IMPROVEMENTS: BUG FIXES: * api: Fixed a panic when canonicalizing a jobspec with an incorrect job type [[GH-7207]](https://github.com/hashicorp/nomad/pull/7207) + * cli: Fixed a panic when displaying device plugins without stats [[GH-7231](https://github.com/hashicorp/nomad/issues/7231)] ## 0.10.4 (February 19, 2020) diff --git a/api/nodes.go b/api/nodes.go index 4a264eb4d330..6a5adf977c05 100644 --- a/api/nodes.go +++ b/api/nodes.go @@ -676,6 +676,8 @@ type StatValue struct { func (v *StatValue) String() string { switch { + case v == nil: + return "" case v.BoolVal != nil: return strconv.FormatBool(*v.BoolVal) case v.StringVal != nil: