Commit 40cda880 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Don't call CopyImage with user lock in NtUserRegisterClassExWOW.

parent 9f3eb4b7
...@@ -358,6 +358,7 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam ...@@ -358,6 +358,7 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
{ {
const BOOL is_builtin = fnid, ansi = flags; const BOOL is_builtin = fnid, ansi = flags;
HINSTANCE instance; HINSTANCE instance;
HICON sm_icon = 0;
CLASS *class; CLASS *class;
ATOM atom; ATOM atom;
BOOL ret; BOOL ret;
...@@ -427,6 +428,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam ...@@ -427,6 +428,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
} }
/* Other non-null values must be set by caller */ /* 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(); user_lock();
if (class->local) list_add_head( &class_list, &class->entry ); if (class->local) list_add_head( &class_list, &class->entry );
...@@ -440,15 +446,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam ...@@ -440,15 +446,11 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
class->hIcon = wc->hIcon; class->hIcon = wc->hIcon;
class->hIconSm = wc->hIconSm; class->hIconSm = wc->hIconSm;
class->hIconSmIntern = sm_icon;
class->hCursor = wc->hCursor; class->hCursor = wc->hCursor;
class->hbrBackground = wc->hbrBackground; class->hbrBackground = wc->hbrBackground;
class->winproc = alloc_winproc( wc->lpfnWndProc, ansi ); class->winproc = alloc_winproc( wc->lpfnWndProc, ansi );
if (client_menu_name) class->menu_name = *client_menu_name; 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 ); release_class_ptr( class );
return atom; return atom;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment