summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/opengl/win/gdiimpl.cxx1
-rw-r--r--vcl/win/source/window/salframe.cxx2
2 files changed, 2 insertions, 1 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 3ba269487ea9..517cff1b853f 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -57,6 +57,7 @@ void WinOpenGLSalGraphicsImpl::Init()
// SalGraphics which share the same hWnd and hDC.
// The shape 'Area' dialog does reparenting to trigger this.
SAL_WARN("vcl.opengl", "Unusual: Windows handle / DC changed without DeInit");
+ DeInit();
}
OpenGLSalGraphicsImpl::Init();
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index d2bb24015457..5cb863f43b17 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -1046,7 +1046,7 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
SalData* pSalData = GetSalData();
if ( mpGraphics2->getDefPal() )
SelectPalette( mpGraphics2->getHDC(), mpGraphics2->getDefPal(), TRUE );
- mpGraphics2->InitGraphics();
+ mpGraphics2->DeInitGraphics();
SendMessageW( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_RELEASEDC,
(WPARAM)mhWnd,