mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #4394 from creack/fix_tty_ghost
Check if the command exists before dereference
This commit is contained in:
commit
6d6ec5e005
1 changed files with 1 additions and 1 deletions
|
@ -839,7 +839,7 @@ func (container *Container) cleanup() {
|
|||
if err := container.stderr.CloseWriters(); err != nil {
|
||||
utils.Errorf("%s: Error close stderr: %s", container.ID, err)
|
||||
}
|
||||
if container.command.Terminal != nil {
|
||||
if container.command != nil && container.command.Terminal != nil {
|
||||
if err := container.command.Terminal.Close(); err != nil {
|
||||
utils.Errorf("%s: Error closing terminal: %s", container.ID, err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue