Fix segfault in top when -l and no args are passed

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1284
Approved by: mheon
This commit is contained in:
haircommander
2018-08-16 10:58:34 -04:00
committed by Atomic Bot
parent dda3a742f2
commit fee9f180fe

View File

@ -85,8 +85,9 @@ func topCmd(c *cli.Context) error {
} }
if err != nil { if err != nil {
return errors.Wrapf(err, "unable to lookup %s", args[0]) return errors.Wrapf(err, "unable to lookup requested container")
} }
conStat, err := container.State() conStat, err := container.State()
if err != nil { if err != nil {
return errors.Wrapf(err, "unable to look up state for %s", args[0]) return errors.Wrapf(err, "unable to look up state for %s", args[0])