Huw Davies : kernelbase: Avoid relying on the exception handler to test that handle != NULL.
Alexandre Julliard
julliard at winehq.org
Fri May 27 16:35:28 CDT 2022
Module: wine
Branch: master
Commit: f27a77e593f687f06080aa91112157bbb86d861c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f27a77e593f687f06080aa91112157bbb86d861c
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Jan 10 14:06:49 2022 +0000
kernelbase: Avoid relying on the exception handler to test that handle != NULL.
Fixes a regression in SlingPlayer 2 caused by commit
a76518c186ac0893ea460cd3b061096f1b05c8cc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52127
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/kernelbase/memory.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c
index b89ab04a38f..9490626a40a 100644
--- a/dlls/kernelbase/memory.c
+++ b/dlls/kernelbase/memory.c
@@ -883,6 +883,7 @@ LPVOID WINAPI DECLSPEC_HOTPATCH LocalLock( HLOCAL handle )
TRACE_(globalmem)( "handle %p\n", handle );
+ if (!handle) return NULL;
if ((ret = unsafe_ptr_from_HLOCAL( handle )))
{
__TRY
More information about the wine-cvs
mailing list