diff --git a/Mage.Common/src/mage/remote/Connection.java b/Mage.Common/src/mage/remote/Connection.java index e120a1ed60..49a9dd66e3 100644 --- a/Mage.Common/src/mage/remote/Connection.java +++ b/Mage.Common/src/mage/remote/Connection.java @@ -183,12 +183,13 @@ public class Connection { NetworkInterface iface = interfaces.nextElement( ); if (iface.isLoopback()) continue; - for (InterfaceAddress addr: iface.getInterfaceAddresses()) - { - InetAddress iaddr = addr.getAddress(); - if (iaddr instanceof Inet4Address) { - return iaddr; - } + for (InterfaceAddress addr: iface.getInterfaceAddresses()) { + if (addr != null) { + InetAddress iaddr = addr.getAddress(); + if (iaddr != null && iaddr instanceof Inet4Address) { + return iaddr; + } + } } } return null;