summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index f34c9d0936cc..27081ed647bd 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -921,13 +921,8 @@ bool WinSalFrame::ReleaseFrameGraphicsDC( WinSalGraphics* pGraphics )
if ( pGraphics->getDefPal() )
SelectPalette( hDC, pGraphics->getDefPal(), TRUE );
pGraphics->DeInitGraphics();
- // we don't want to run the WinProc in the main thread directly
- // so we don't hit the mbNoYieldLock assert
- if ( !pSalData->mpInstance->IsMainThread() )
- SendMessageW( pSalData->mpInstance->mhComWnd, SAL_MSG_RELEASEDC,
- reinterpret_cast<WPARAM>(mhWnd), reinterpret_cast<LPARAM>(hDC) );
- else
- ReleaseDC( mhWnd, hDC );
+ SendMessageW( pSalData->mpInstance->mhComWnd, SAL_MSG_RELEASEDC,
+ reinterpret_cast<WPARAM>(mhWnd), reinterpret_cast<LPARAM>(hDC) );
if ( pGraphics == mpThreadGraphics )
pSalData->mnCacheDCInUse--;
pGraphics->setHDC(nullptr);