diff --git a/ICD.Common.Utils/IcdEnvironment.Standard.cs b/ICD.Common.Utils/IcdEnvironment.Standard.cs index 62d607c..d734cc2 100644 --- a/ICD.Common.Utils/IcdEnvironment.Standard.cs +++ b/ICD.Common.Utils/IcdEnvironment.Standard.cs @@ -57,14 +57,21 @@ namespace ICD.Common.Utils { get { - bool enabled = - NetworkInterface.GetAllNetworkInterfaces() - .Where(ni => ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || - ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet) - .Select(ni => ni.GetIPProperties().GetIPv4Properties().IsDhcpEnabled) - .FirstOrDefault(); + try + { + bool enabled = + NetworkInterface.GetAllNetworkInterfaces() + .Where(ni => ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || + ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet) + .Select(ni => ni.GetIPProperties().GetIPv4Properties().IsDhcpEnabled) + .FirstOrDefault(); - return enabled.ToString(); + return enabled.ToString(); + } + catch(PlatformNotSupportedException) + { + return false.ToString(); + } } }