From 77225d1d1a75070b2c81366ccddcea41f11682fa Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Tue, 22 Jan 2019 19:34:02 -0600 Subject: [PATCH] nil check node resources to prevent panic --- command/node_status.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/node_status.go b/command/node_status.go index e07bb47e8..934ef2f97 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -530,6 +530,9 @@ func (c *NodeStatusCommand) formatAttributes(node *api.Node) { } func (c *NodeStatusCommand) formatDeviceAttributes(node *api.Node) { + if node.NodeResources == nil { + return + } devices := node.NodeResources.Devices if len(devices) == 0 { return