Merge pull request #88348 from tedyu/image-not-nil

Check that ImageInspect pointer is not nil
This commit is contained in:
Kubernetes Prow Robot 2020-03-17 16:21:01 -07:00 committed by GitHub
commit 761c72f691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,7 @@ func (ds *dockerService) ContainerStatus(_ context.Context, req *runtimeapi.Cont
labels, annotations := extractLabels(r.Config.Labels)
imageName := r.Config.Image
if len(ir.RepoTags) > 0 {
if ir != nil && len(ir.RepoTags) > 0 {
imageName = ir.RepoTags[0]
}
status := &runtimeapi.ContainerStatus{