Merge pull request #1 from mlaventure/chp-moby-33409

prevent image prune panic
This commit is contained in:
Andrew Hsu
2017-06-02 10:38:26 -07:00
committed by GitHub
+1 -1
View File
@@ -216,7 +216,7 @@ func (daemon *Daemon) ImagesPrune(ctx context.Context, pruneFilters filters.Args
if !until.IsZero() && img.Created.After(until) {
continue
}
if !matchLabels(pruneFilters, img.Config.Labels) {
if img.Config != nil && !matchLabels(pruneFilters, img.Config.Labels) {
continue
}
topImages[id] = img