record: fix nil pointer in log string

This commit is contained in:
Oliver Gugger committed 2021-09-16 19:51:03 +02:00
1 parent 7d012ae581
commit dd3f3e7ce5
3 files changed
+28 -8

No files matched your search

+4
View File
@@ -105,5 +105,9 @@ func (r *MPP) PayloadSize() uint64 {
// String returns a human-readable representation of the mpp payload field.
func (r *MPP) String() string {
if r == nil {
return "<nil>"
}
return fmt.Sprintf("total=%v, addr=%x", r.totalMsat, r.paymentAddr)
}