From 2df418abf1df4ad4a2d962bf21d26ed027ebd828 Mon Sep 17 00:00:00 2001 From: cty123 Date: Sun, 16 Jul 2023 23:02:15 +0200 Subject: [PATCH] fix: Check if address is nil for IsValid() function. --- common/net/destination.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/net/destination.go b/common/net/destination.go index 055395e9..2d0d09ed 100644 --- a/common/net/destination.go +++ b/common/net/destination.go @@ -113,7 +113,7 @@ func (d Destination) String() string { // IsValid returns true if this Destination is valid. func (d Destination) IsValid() bool { - return d.Network != Network_Unknown + return d.Address != nil && d.Network != Network_Unknown } // AsDestination converts current Endpoint into Destination.