don't deref. null pointer in case NameServer key doesn't exist

svn path=/trunk/; revision=36849
This commit is contained in:
Kamil Hornicek 2008-10-20 17:06:13 +00:00
parent b686c53533
commit a38d530792

View file

@ -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" );