vcl/win/window/salframe.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit d9321109253187b7bdc18c887b108e6e2b5fc5ac Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Apr 24 10:31:25 2025 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Apr 24 12:42:04 2025 +0200 Useless declaration with initialization before setting the actual value Change-Id: Ia59445a2434152c40bd128020b17587bc1dd9044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184540 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index cb5daa463a4b..c0db43ff227e 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -1019,15 +1019,13 @@ SalGraphics* WinSalFrame::AcquireGraphics() return nullptr; SalData* pSalData = GetSalData(); - WinSalGraphics *pGraphics = nullptr; - HDC hDC = nullptr; assert(pSalData->mpInstance->IsMainThread()); SAL_WARN_IF(!pSalData->mpInstance->IsMainThread(), "vcl", "ERROR: pSalData->mpInstance is not main thread!"); if ( !mpLocalGraphics ) mpLocalGraphics = new WinSalGraphics(WinSalGraphics::WINDOW, true, mhWnd, this); - pGraphics = mpLocalGraphics; - hDC = pGraphics->getHDC(); + WinSalGraphics* pGraphics = mpLocalGraphics; + HDC hDC = pGraphics->getHDC(); if ( !hDC ) hDC = GetDC( mhWnd );