1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

Fix possible NullArgumentException throw by using a null return.

This commit is contained in:
Marius Ungureanu
2015-09-05 10:32:37 +03:00
parent 2d9a1a1afa
commit d8ff2c9d31

View File

@@ -72,7 +72,7 @@ namespace Lidgren.Network
public static NetEndPoint Resolve(string ipOrHost, int port)
{
var adr = Resolve(ipOrHost);
return new NetEndPoint(adr, port);
return adr == null ? null : new NetEndPoint(adr, port);
}
private static IPAddress s_broadcastAddress;