[Libreoffice-commits] .: svx/source
Josh Heidenreich
jheidenreich at kemper.freedesktop.org
Mon Feb 20 15:01:27 PST 2012
svx/source/svdraw/svdotextpathdecomposition.cxx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 1248e2af6a70c44651b74d2950aeabb64c1c70e7
Author: Josh Heidenreich <josh.sickmate at gmail.com>
Date: Tue Feb 21 09:27:38 2012 +1030
Fixed a possible NULL-dereference found by cppcheck in svx
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 6488124..0276f05 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -361,15 +361,16 @@ namespace
{
const impPathTextPortion* pCandidate = rTextPortions[a];
basegfx::B2DVector aFontScaling;
- const drawinglayer::attribute::FontAttribute aCandidateFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
- aFontScaling,
- pCandidate->getFont(),
- pCandidate->isRTL(),
- false));
if(pCandidate && pCandidate->getTextLength())
{
+ const drawinglayer::attribute::FontAttribute aCandidateFontAttribute(
+ drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ aFontScaling,
+ pCandidate->getFont(),
+ pCandidate->isRTL(),
+ false));
+
drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFont(pCandidate->getFont());
xub_StrLen nUsedTextLength(0);
More information about the Libreoffice-commits
mailing list