Skip to content

Commit

Permalink
Fix a panic occurring from nil, nil TxResults response
Browse files Browse the repository at this point in the history
  • Loading branch information
cjepson committed Feb 23, 2016
1 parent e875bf3 commit 6d8f657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2486,9 +2486,9 @@ func GetStakeInfo(w *wallet.Wallet, chainSvr *chain.Client,
}

txResult, err := w.TxStore.TxDetails(ticketHash)
if err != nil {
if err != nil || txResult == nil {
log.Tracef("Failed to find ticket in blockchain while generating "+
"stake info (hash %v, err %s)", ticketHash, err.Error())
"stake info (hash %v, err %s)", ticketHash, err)
continue
}

Expand Down

0 comments on commit 6d8f657

Please sign in to comment.