diff --git a/Netch/Utils/DNS.cs b/Netch/Utils/DNS.cs index 5b06bc99..014637da 100644 --- a/Netch/Utils/DNS.cs +++ b/Netch/Utils/DNS.cs @@ -49,6 +49,8 @@ namespace Netch.Utils private static RegistryKey AdapterRegistry(bool write = false) { + if (Global.Outbound.Adapter == null) + Utils.SearchOutboundAdapter(); return Registry.LocalMachine.OpenSubKey( $@"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{Global.Outbound.Adapter.Id}", write); }