From be9dd7b85f889e31fbd93465535b9962ed585ced Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Mon, 13 May 2013 13:08:16 -0700 Subject: [PATCH] Make sure that the layer exists prior to store it --- graph.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.go b/graph.go index d9b4f5ac5c..14731622e6 100644 --- a/graph.go +++ b/graph.go @@ -113,7 +113,7 @@ func (graph *Graph) Create(layerData Archive, container *Container, comment, aut img.Container = container.Id img.ContainerConfig = *container.Config } - if err := graph.Register(layerData, true, img); err != nil { + if err := graph.Register(layerData, layerData != nil, img); err != nil { return nil, err } go img.Checksum()