From 9950bb9b7ce41c8463cc7e6342f9c13e8c36a43c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 9 May 2019 14:29:31 +0100 Subject: [PATCH] about: fix crash if backend returns a nil usage --- cmd/about/about.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/about/about.go b/cmd/about/about.go index 81b7493f1..4b29afa8b 100644 --- a/cmd/about/about.go +++ b/cmd/about/about.go @@ -95,6 +95,9 @@ Use the --json flag for a computer readable output, eg if err != nil { return errors.Wrap(err, "About call failed") } + if u == nil { + return errors.New("nil usage returned") + } if jsonOutput { out := json.NewEncoder(os.Stdout) out.SetIndent("", "\t")