From 78870b2bfb1fdaca7ffa868992d769e35e683547 Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Wed, 24 Apr 2024 20:52:53 +0100 Subject: [PATCH] chore: check for nil market Signed-off-by: Jeremy Letang --- core/execution/engine_snapshot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/execution/engine_snapshot.go b/core/execution/engine_snapshot.go index 82ebd5eedc5..1aff5eee86f 100644 --- a/core/execution/engine_snapshot.go +++ b/core/execution/engine_snapshot.go @@ -249,6 +249,9 @@ func (e *Engine) restoreMarketsStates(ctx context.Context, ems []*types.ExecMark pvds := make([]types.StateProvider, 0, len(ems)*4) for _, em := range ems { + if em == nil || em.Market == nil { + continue + } m, err := e.restoreMarket(ctx, em) if err != nil { return nil, fmt.Errorf("failed to restore market: %w", err)