diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 59a3d9b33f3..3b6c2eaccf3 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1037,9 +1037,9 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode ) ret = dc->GraphicsMode; dc->GraphicsMode = mode; } - release_dc_ptr( dc ); /* font metrics depend on the graphics mode */ - if (ret) SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT)); + if (ret != mode) SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT)); + release_dc_ptr( dc ); return ret; }