Skip to content

Commit 939d3c2

Browse files
authored
Merge pull request #543 from kevpar/fix-stats-crash
Fix crash when using stats command
2 parents ead8d31 + a5d601d commit 939d3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/crictl/stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var statsCommand = cli.Command{
9292
defer closeConnection(context, runtimeConn)
9393

9494
id := context.String("id")
95-
if id == "" && context.Args() != nil {
95+
if id == "" && context.NArg() > 0 {
9696
id = context.Args()[0]
9797
}
9898

0 commit comments

Comments
 (0)