Commit 5e481ab9 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32: Handle NULL name when setting registry value.

parent df08cd44
......@@ -506,7 +506,7 @@ static HKEY reg_create_key( HKEY root, const WCHAR *name, ULONG name_len,
static void set_reg_value( HKEY hkey, const WCHAR *name, UINT type, const void *value, DWORD count )
{
unsigned int name_size = lstrlenW( name ) * sizeof(WCHAR);
unsigned int name_size = name ? lstrlenW( name ) * sizeof(WCHAR) : 0;
UNICODE_STRING nameW = { name_size, name_size, (WCHAR *)name };
NtSetValueKey( hkey, &nameW, 0, type, value, count );
}
......
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