diff --git a/reactos/dll/win32/iphlpapi/resinfo_reactos.c b/reactos/dll/win32/iphlpapi/resinfo_reactos.c index a9516582038..a4625efb805 100644 --- a/reactos/dll/win32/iphlpapi/resinfo_reactos.c +++ b/reactos/dll/win32/iphlpapi/resinfo_reactos.c @@ -229,7 +229,7 @@ PIPHLP_RES_INFO getResInfo() { Str = QueryRegistryValueString( hKey, L"NameServer" ); /* If NameServer is empty */ - if (*Str == L'\0') + if (!Str || *Str == L'\0') { /* Then use DhcpNameServer */ Str = QueryRegistryValueString( hKey, L"DhcpNameServer" );