Commit dec34b48 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet
Browse files

p2p/net/swarm/addr: check for nil addr

parent 3037ac2e
......@@ -80,6 +80,9 @@ func AddrOverNonLocalIP(a ma.Multiaddr) bool {
// as we need to be able to connect to multiple ipfs nodes
// in the same machine.
func AddrUsable(a ma.Multiaddr, partial bool) bool {
if a == nil {
return false
}
if !AddrOverNonLocalIP(a) {
return false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment