Jacek Caban : user32: Initialize module handle to NULL for null driver.
Alexandre Julliard
julliard at winehq.org
Sun Feb 16 15:23:58 CST 2020
Module: wine
Branch: master
Commit: be6e6fb23c2ca48def5e0c6916f4eeae097916e7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=be6e6fb23c2ca48def5e0c6916f4eeae097916e7
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 14 12:04:26 2020 +0100
user32: Initialize module handle to NULL for null driver.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index 07be6a9a4a..8f3e1b3597 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -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 );
}
More information about the wine-cvs
mailing list