summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-05 15:51:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-08 07:37:26 +0100
commit04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (patch)
tree7c7c85944d8172033d58c626b44df6f735e0bc38 /canvas
parent72841008bf422dfd8553240b3a78f0474d03523c (diff)
loplugin:refcounting check for one more case
where we might be holding something newly created by pointer instead of by *::Reference Change-Id: Ife6f7acae4252bf56dcdeb95d72e43c523444f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index d64e1ba1d7f0..0484f710ae53 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -679,7 +679,8 @@ namespace oglcanvas
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->EnableOutput(false);
- CanvasFont* pFont=dynamic_cast<CanvasFont*>(xLayoutetText->getFont().get());
+ auto pLayoutFont = xLayoutetText->getFont();
+ CanvasFont* pFont=dynamic_cast<CanvasFont*>(pLayoutFont.get());
const rendering::StringContext& rTxt=xLayoutetText->getText();
if( pFont && rTxt.Length )
{