From 574c437319e9f6b19b7cd83d397c6d0f06064c21 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 20 Oct 2018 19:00:46 +0100 Subject: pvs-studio: reference becomes invalid when temporary object destroyed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibe39738e1a607e3bca273fc03f0f3232024254bc Reviewed-on: https://gerrit.libreoffice.org/62093 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- canvas/source/directx/dx_canvashelper.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 1a252382a773..ecba3af57952 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -624,15 +624,15 @@ namespace dxcanvas // Setup an ImageAttributes with an alpha-modulating // color matrix. - const rendering::ARGBColor& rARGBColor( + rendering::ARGBColor aARGBColor( mpDevice->getDeviceColorSpace()->convertToARGB(renderState.DeviceColor)[0]); Gdiplus::ImageAttributes aImgAttr; tools::setModulateImageAttributes( aImgAttr, - rARGBColor.Red, - rARGBColor.Green, - rARGBColor.Blue, - rARGBColor.Alpha ); + aARGBColor.Red, + aARGBColor.Green, + aARGBColor.Blue, + aARGBColor.Alpha ); ENSURE_OR_THROW( Gdiplus::Ok == pGraphics->DrawImage( pBitmap.get(), -- cgit v1.2.3