diff --git a/routing/payment_lifecycle.go b/routing/payment_lifecycle.go index f1119c698a..cdea813541 100644 --- a/routing/payment_lifecycle.go +++ b/routing/payment_lifecycle.go @@ -872,8 +872,10 @@ func (p *shardHandler) handleSendError(attempt *channeldb.HTLCAttemptInfo, return failPayment(&internalErrorReason, sendErr) } - log.Infof("Node=%v reported failure when sending htlc, code: %v", - failureSourceIdx, failureMessage.Code()) + if failureMessage != nil { + log.Infof("Node=%v reported failure when sending htlc, code: %v", + failureSourceIdx, failureMessage.Code()) + } return reportFail(&failureSourceIdx, failureMessage) }