From 1dfc44073399aadb226c1b4c1909fb15c033d44a Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 17 Mar 2014 19:33:40 +0000 Subject: [PATCH] fix panic in monitor Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- runtime/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/container.go b/runtime/container.go index 9b138c89c1..5241c5cfe5 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -785,7 +785,7 @@ func (container *Container) monitor(callback execdriver.StartCallback) error { utils.Errorf("Error running container: %s", err) } - if container.runtime.srv.IsRunning() { + if container.runtime != nil && container.runtime.srv != nil && container.runtime.srv.IsRunning() { container.State.SetStopped(exitCode) // FIXME: there is a race condition here which causes this to fail during the unit tests.