Skip to content

Commit

Permalink
proposals: Avoid taking value of nil pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGruffins authored and dreacot committed Oct 11, 2023
1 parent afa1608 commit fbb2f82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/page/governance/proposal_vote_modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func newVoteModal(l *load.Load, proposal *libwallet.Proposal) *voteModal {
voteDetails, err := vm.WL.AssetsManager.Politeia.ProposalVoteDetailsRaw(ctx, w.Internal().DCR, vm.proposal.Token)
vm.detailsMu.Lock()
if !components.ContextDone(ctx) {
vm.voteDetails = &libwallet.ProposalVoteDetails{ProposalVoteDetails: *voteDetails}
if voteDetails != nil {
vm.voteDetails = &libwallet.ProposalVoteDetails{ProposalVoteDetails: *voteDetails}
}
vm.voteDetailsErr = err
}
vm.detailsMu.Unlock()
Expand Down

0 comments on commit fbb2f82

Please sign in to comment.