Merge pull request #4394 from creack/fix_tty_ghost
Check if the command exists before dereference Upstream-commit: 6d6ec5e0051ad081be3d71e20b39a25c711b4bc3 Component: engine
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user