diff options
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 36aae2884214..6bc8b7dfa551 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1457,9 +1457,9 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b sal_Int32 nTextWidth; pVDev->SetMapMode( MapMode( MapUnit::Map100thMM ) ); pVDev->SetFont( maFont ); - if( pDXArry ) + const sal_uInt32 nLen = pDXArry ? rText.getLength() : 0; + if (nLen) { - sal_uInt32 nLen = rText.getLength(); nTextWidth = pVDev->GetTextWidth( OUString(rText[ nLen - 1 ]) ); if( nLen > 1 ) nTextWidth += pDXArry[ nLen - 2 ]; |