mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 05:34:46 +00:00
win32u: Don't call CopyImage with user lock in NtUserRegisterClassExWOW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53082 Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
9f3eb4b7f0
commit
40cda88021
|
@ -358,6 +358,7 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
|
|||
{
|
||||
const BOOL is_builtin = fnid, ansi = flags;
|
||||
HINSTANCE instance;
|
||||
HICON sm_icon = 0;
|
||||
CLASS *class;
|
||||
ATOM atom;
|
||||
BOOL ret;
|
||||
|
@ -427,6 +428,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
|
|||
}
|
||||
|
||||
/* Other non-null values must be set by caller */
|
||||
if (wc->hIcon && !wc->hIconSm)
|
||||
sm_icon = CopyImage( wc->hIcon, IMAGE_ICON,
|
||||
get_system_metrics( SM_CXSMICON ),
|
||||
get_system_metrics( SM_CYSMICON ),
|
||||
LR_COPYFROMRESOURCE );
|
||||
|
||||
user_lock();
|
||||
if (class->local) list_add_head( &class_list, &class->entry );
|
||||
|
@ -440,15 +446,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
|
|||
|
||||
class->hIcon = wc->hIcon;
|
||||
class->hIconSm = wc->hIconSm;
|
||||
class->hIconSmIntern = sm_icon;
|
||||
class->hCursor = wc->hCursor;
|
||||
class->hbrBackground = wc->hbrBackground;
|
||||
class->winproc = alloc_winproc( wc->lpfnWndProc, ansi );
|
||||
if (client_menu_name) class->menu_name = *client_menu_name;
|
||||
if (wc->hIcon && !wc->hIconSm)
|
||||
class->hIconSmIntern = CopyImage( wc->hIcon, IMAGE_ICON,
|
||||
get_system_metrics( SM_CXSMICON ),
|
||||
get_system_metrics( SM_CYSMICON ),
|
||||
LR_COPYFROMRESOURCE );
|
||||
release_class_ptr( class );
|
||||
return atom;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue