summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-20 19:00:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-21 20:12:30 +0200
commit574c437319e9f6b19b7cd83d397c6d0f06064c21 (patch)
tree9f08266e5502f1f36d37b4c9c4625373615839d6
parent6e15a3e2e45c21d947d36f47bfcb66d9f02b8c63 (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>
-rw-r--r--canvas/source/directx/dx_canvashelper.cxx10
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(),