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

Huw Davies huw at codeweavers.com
Fri Jul 29 09:15:14 CDT 2016


On Fri, Jul 29, 2016 at 09:22:43PM +0900, Alexandre Julliard wrote:
> 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.

Good catch (although it was originally your bug ;-) )

I've resent the entire series with an additional patch [8/11]
which fixes this.  It also only reselects the font if the mode
changes.  The other patches in the series are essentially the
same as v1.

Huw.



More information about the wine-devel mailing list