[PATCH 08/10] gdi32: Where possible directly access the DC instead of using GetCurrentObject().

Alexandre Julliard julliard at winehq.org
Fri Jul 29 07:22:43 CDT 2016


Huw Davies <huw at codeweavers.com> writes:

> @@ -1039,7 +1039,7 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode )
>      }
>      release_dc_ptr( dc );
>      /* font metrics depend on the graphics mode */
> -    if (ret) SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT));
> +    if (ret) SelectObject(dc->hSelf, dc->hFont);

The bug was already present, but we shouldn't be accessing the dc after
release.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list