diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-20 19:00:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-21 20:12:30 +0200 |
commit | 574c437319e9f6b19b7cd83d397c6d0f06064c21 (patch) | |
tree | 9f08266e5502f1f36d37b4c9c4625373615839d6 /canvas | |
parent | 6e15a3e2e45c21d947d36f47bfcb66d9f02b8c63 (diff) |
pvs-studio: reference becomes invalid when temporary object destroyed
Change-Id: Ibe39738e1a607e3bca273fc03f0f3232024254bc
Reviewed-on: https://gerrit.libreoffice.org/62093
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_canvashelper.cxx | 10 |
1 files 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(), |