Skip to content

Commit

Permalink
nil dereference fix on image history Created value
Browse files Browse the repository at this point in the history
Issue was caused by the changes here #45504
First released in v25.0.0-beta.1

Signed-off-by: Christopher Petito <47751006+krissetto@users.noreply.github.com>
(cherry picked from commit ab570ab)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
  • Loading branch information
krissetto authored and austinvazquez committed Apr 23, 2024
1 parent 5beae56 commit d93cc7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion daemon/images/image_history.go
Expand Up @@ -42,9 +42,14 @@ func (i *ImageService) ImageHistory(ctx context.Context, name string) ([]*image.
layerCounter++
}

var created int64
if h.Created != nil {
created = h.Created.Unix()
}

history = append([]*image.HistoryResponseItem{{
ID: "<missing>",
Created: h.Created.Unix(),
Created: created,
CreatedBy: h.CreatedBy,
Comment: h.Comment,
Size: layerSize,
Expand Down

0 comments on commit d93cc7e

Please sign in to comment.