1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

fix: fixes potential nil pointer when no container exists (#3828)

This commit is contained in:
Amir Raminfar
2025-04-21 12:55:52 -07:00
committed by GitHub
parent 3645100402
commit 10705f05a6

View File

@@ -315,7 +315,7 @@ func (s *ContainerStore) init() {
case "update":
started := false
updatedContainer, _ := s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, xsync.ComputeOp) {
if loaded {
if loaded && event.Container != nil {
newContainer := event.Container
if newContainer.State == "running" && c.State != "running" {
started = true