From e9f1638de6df17e705fa9db455ac9c7a19cd8ede Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 27 Sep 2007 21:00:44 +0200 Subject: [PATCH] gdi32: Don't hold the GDI lock while calling the SelectObject backends. --- dlls/gdi32/gdiobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index 9539d618bd8..56d3f91e785 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -1156,9 +1156,9 @@ HGDIOBJ WINAPI SelectObject( HDC hdc, HGDIOBJ hObj ) header = GDI_GetObjPtr( hObj, MAGIC_DONTCARE ); if (header) { - if (header->funcs && header->funcs->pSelectObject) - ret = header->funcs->pSelectObject( hObj, hdc ); - GDI_ReleaseObj( hObj ); + const struct gdi_obj_funcs *funcs = header->funcs; + GDI_ReleaseObj( hObj ); + if (funcs && funcs->pSelectObject) ret = funcs->pSelectObject( hObj, hdc ); } } return ret;