fix: TestCommandEcBalanceSmall Unit test fails when CommandEnv is nil (#3497)

This commit is contained in:
famosss 2022-08-23 14:54:51 +08:00 committed by GitHub
parent 7eb15b1969
commit 911475526c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error {
}
func (ce *CommandEnv) isLocked() bool {
return ce.locker.IsLocked()
return ce != nil && ce.locker.IsLocked()
}
func (ce *CommandEnv) checkDirectory(path string) error {