소스 검색

Merge pull request #4394 from creack/fix_tty_ghost

Check if the command exists before dereference
Victor Vieux 11 년 전
부모
커밋
6d6ec5e005
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      container.go

+ 1 - 1
container.go

@@ -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)
 		}