Commit a16b9ff5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

comdlg32: Improve error handling in get_config_key_string.

parent 0239026b
......@@ -250,11 +250,10 @@ static BOOL get_config_key_string(HKEY hkey, const WCHAR *name, WCHAR **value)
DWORD type, size;
WCHAR *str;
if (hkey && !RegQueryValueExW(hkey, name, 0, &type, NULL, &size))
{
if (RegQueryValueExW(hkey, name, 0, &type, NULL, &size))
return FALSE;
if (type != REG_SZ && type != REG_EXPAND_SZ)
return FALSE;
}
str = heap_alloc(size);
if (RegQueryValueExW(hkey, name, 0, &type, (BYTE *)str, &size))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment