Module: wine Branch: master Commit: be6e6fb23c2ca48def5e0c6916f4eeae097916e7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=be6e6fb23c2ca48def5e0c691...
Author: Jacek Caban jacek@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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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 ); }