From e83a78ee6d148d5a891df279059b71d1837e255f Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Mon, 4 Dec 2023 00:38:18 +0100 Subject: [PATCH] Fix: fix possible nil pointer exception --- pkg/protocol/commitment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/protocol/commitment.go b/pkg/protocol/commitment.go index 49a8936a0..e49ad25ea 100644 --- a/pkg/protocol/commitment.go +++ b/pkg/protocol/commitment.go @@ -289,7 +289,7 @@ func (c *Commitment) deriveReplayDroppedBlocks(chain *Chain) func() { // the parent is on the target Chain. func (c *Commitment) forceChain(targetChain *Chain) { if currentChain := c.Chain.Get(); currentChain != targetChain { - if parent := c.Parent.Get(); parent.Chain.Get() == targetChain { + if parent := c.Parent.Get(); parent != nil && parent.Chain.Get() == targetChain { parent.MainChild.Set(c) } }