This commit is contained in:
josc146 2023-07-07 13:53:39 +08:00
parent 543ff468b7
commit 115c59d5e1

View File

@ -119,8 +119,10 @@ func (a *App) WslStop() error {
if !running {
return errors.New("wsl not running")
}
err = cmd.Process.Kill()
cmd = nil
if cmd != nil {
err = cmd.Process.Kill()
cmd = nil
}
// stdin.Close()
stdin = nil
distro = nil