Skip to content

Commit

Permalink
routing: fix nil pointer panic when node has no outgoing channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Jan 17, 2017
1 parent 7a36fb4 commit 0c7fcb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routing/pathfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func findRoute(graph *channeldb.ChannelGraph, target *btcec.PublicKey,

// If we've reached our target, then we're done here and can
// exit the graph traversal early.
if bestNode.PubKey.IsEqual(target) {
if bestNode == nil || bestNode.PubKey.IsEqual(target) {
break
}

Expand Down

0 comments on commit 0c7fcb1

Please sign in to comment.