diff options
author | David Tardon <dtardon@redhat.com> | 2014-11-03 15:54:08 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-11-03 18:48:36 +0100 |
commit | dbf093aa59db9b8ccb312f7a5cd2a997f704dc90 (patch) | |
tree | 6c69e7b97b2dcd7aecd3d73cbf7d8af96c1f6485 /canvas | |
parent | 7e4920419e4a7c791ad6becd39078f3814876003 (diff) |
coverity#982921 do not leak
Change-Id: I7f40b7e72caa67644b23f02fa6c2a4ccfe4f354d
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper_text.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index e4117525e9ff..c9c370210918 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -332,7 +332,7 @@ namespace cairocanvas OSL_TRACE(":cairocanvas::CanvasHelper::drawText(O,t,f,v,r,d): %s", OUStringToOString( text.Text.copy( text.StartPosition, text.Length ), RTL_TEXTENCODING_UTF8 ).getStr()); - TextLayout* pTextLayout = new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider); + rtl::Reference< TextLayout > pTextLayout( new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider) ); pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState ); } |