diff --git a/server/cmt_cmds.go b/server/cmt_cmds.go index 3f18ff25c975..abbc4a9f5da3 100644 --- a/server/cmt_cmds.go +++ b/server/cmt_cmds.go @@ -247,7 +247,10 @@ $ %s query block --%s=%s err error height int64 ) - heightStr := args[0] + heightStr := "" + if len(args) > 0 { + heightStr = args[0] + } if heightStr == "" { cmd.Println("Falling back to latest block height:")