user32: Initialize module handle to NULL for null driver.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-02-14 12:04:26 +01:00 committed by Alexandre Julliard
parent dcae1afa05
commit be6e6fb23c

View File

@ -77,7 +77,8 @@ static BOOL load_desktop_driver( HWND hwnd, HMODULE *module )
size = sizeof(path);
if (!RegQueryValueExW( hkey, driverW, NULL, NULL, (BYTE *)path, &size ))
{
ret = !strcmpW( path, nullW ) || (*module = LoadLibraryW( path ));
if ((ret = !strcmpW( path, nullW ))) *module = NULL;
else ret = (*module = LoadLibraryW( path )) != NULL;
if (!ret) ERR( "failed to load %s\n", debugstr_w(path) );
TRACE( "%s %p\n", debugstr_w(path), *module );
}