mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-28 03:46:33 +00:00
nil check when dereferencing voteSet.votes
This commit is contained in:
+3
-1
@@ -385,7 +385,9 @@ func (voteSet *VoteSet) List() []Vote {
|
||||
}
|
||||
votes := make([]Vote, len(voteSet.votes))
|
||||
for i := range voteSet.votes {
|
||||
votes[i] = *voteSet.votes[i]
|
||||
if voteSet.votes[i] != nil {
|
||||
votes[i] = *voteSet.votes[i]
|
||||
}
|
||||
}
|
||||
return votes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user