Explorar el Código

fix: Check if address is nil for IsValid() function.

cty123 hace 2 años
padre
commit
2df418abf1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      common/net/destination.go

+ 1 - 1
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.