[crash] fix nil pointer deference

Signed-off-by: Leo Chen <leo@harmony.one>
pull/729/head
Leo Chen 6 years ago
parent 85b1f5001d
commit 42cf3d59ac
  1. 2
      node/node_handler.go

@ -541,7 +541,7 @@ func (node *Node) epochShardStateMessageHandler(msgPayload []byte) int {
utils.GetLogInstance().Error("Can't get shard state Message", "error", err) utils.GetLogInstance().Error("Can't get shard state Message", "error", err)
return -1 return -1
} }
if node.Consensus.ShardID != 0 { if node.Consensus != nil && node.Consensus.ShardID != 0 {
node.processEpochShardState(epochShardState) node.processEpochShardState(epochShardState)
} }
return 0 return 0

Loading…
Cancel
Save