Skip to content

Commit

Permalink
chore: check for nil market
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <me@jeremyletang.com>
  • Loading branch information
jeremyletang committed Apr 24, 2024
1 parent 2454552 commit 78870b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/execution/engine_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 78870b2

Please sign in to comment.