Skip to content

Commit

Permalink
fix: nil condition
Browse files Browse the repository at this point in the history
  • Loading branch information
qinglin89 committed Jul 22, 2022
1 parent 0367c67 commit 99b4d43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ func (s *StateDB) StopPrefetcher() {
if s.noTrie {
return
}
s.prefetcher.close()
s.prefetcherLock.Lock()
if s.prefetcher != nil {
s.prefetcher.close()
}
s.prefetcherLock.Unlock()
}

// Mark that the block is processed by diff layer
Expand Down

0 comments on commit 99b4d43

Please sign in to comment.