Browse code

Make sure that the layer exists prior to store it

Guillaume J. Charmes authored on 2013/05/14 05:08:16
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ func (graph *Graph) Create(layerData Archive, container *Container, comment, aut
113 113
 		img.Container = container.Id
114 114
 		img.ContainerConfig = *container.Config
115 115
 	}
116
-	if err := graph.Register(layerData, true, img); err != nil {
116
+	if err := graph.Register(layerData, layerData != nil, img); err != nil {
117 117
 		return nil, err
118 118
 	}
119 119
 	go img.Checksum()