summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-14 18:50:14 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-14 18:51:00 +0200
commitbdab2dc21c42c33c92317d13cfacb4b142824d13 (patch)
treed6a6a1272e34b1443088eaea5acdce40ec6e1ac4 /vcl
parentf6df52aa3aad9c7650b6ca051d9a28c4ccb6a060 (diff)
avoid memory leak
Change-Id: I89e458dbd01a45761948b64cb457424383ca5f51
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/text.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 7b955666f068..1c20f7f08050 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2409,7 +2409,10 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
Point aOffset( nWidth/2, 8 );
Size aOutSize( nWidth + 2*aOffset.X(), nHeight + 2*aOffset.Y() );
if( !nWidth || !aVDev.SetOutputSizePixel( aOutSize ) )
+ {
+ pSalLayout->Release();
return false;
+ }
// draw text in black
pSalLayout->DrawBase() = aOffset;