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:
@@ -315,7 +315,7 @@ func (s *ContainerStore) init() {
|
|||||||
case "update":
|
case "update":
|
||||||
started := false
|
started := false
|
||||||
updatedContainer, _ := s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, xsync.ComputeOp) {
|
updatedContainer, _ := s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, xsync.ComputeOp) {
|
||||||
if loaded {
|
if loaded && event.Container != nil {
|
||||||
newContainer := event.Container
|
newContainer := event.Container
|
||||||
if newContainer.State == "running" && c.State != "running" {
|
if newContainer.State == "running" && c.State != "running" {
|
||||||
started = true
|
started = true
|
||||||
|
|||||||
Reference in New Issue
Block a user