summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJosh Heidenreich <josh.sickmate@gmail.com>2012-02-21 09:27:38 +1030
committerJosh Heidenreich <josh.sickmate@gmail.com>2012-02-21 09:31:24 +1030
commit1248e2af6a70c44651b74d2950aeabb64c1c70e7 (patch)
treefdb5f91308e066fecac4ed9e97e93f03bc4a55b2 /svx
parent30869cdcf761fea01b80ff09d99fd25b9fd7ce39 (diff)
Fixed a possible NULL-dereference found by cppcheck in svx
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 648812461644..0276f0599f65 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);