diff options
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 86e1e616a57f..332c7a8dfaae 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -1373,6 +1373,9 @@ WinSalPrinter::~WinSalPrinter() HDC hDC = mhDC; if ( hDC ) { + // explicitly reset(), so the mxGraphics's borrowed HDC defaults are + // restored and WinSalGraphics's destructor won't work on a deleted HDC. + mxGraphics.reset(); DeleteDC( hDC ); } |