panic fix

This commit is contained in:
William Banfield
2022-01-12 19:10:06 -05:00
parent db3ad90c64
commit d48f40e6f7
+1 -1
View File
@@ -380,7 +380,7 @@ func (voteSet *VoteSet) GetByIndex(valIndex int32) *Vote {
// List returns a copy of the list of votes stored by the VoteSet.
func (voteSet *VoteSet) List() []Vote {
if voteSet == nil {
if voteSet == nil || voteSet.votes == nil {
return nil
}
votes := make([]Vote, len(voteSet.votes))