summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-18 22:09:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-19 17:31:31 +0100
commit85ac2681a390b252408b347cbbc6d01efb0bf850 (patch)
tree3f28f677b5dbf7868849db2298d1ea480f9eb5f4 /vcl/source
parentd1b9eeab4f259e238906818018e93a6b161e02aa (diff)
ImplLayout can return NULL
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/outdev3.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 67ef1fe9e430..adc2bf7736fd 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -7408,7 +7408,8 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
aSysLayoutData.nSize = sizeof(aSysLayoutData);
aSysLayoutData.rGlyphData.reserve( 256 );
- if ( mpMetaFile ) {
+ if ( mpMetaFile )
+ {
if (pDXAry)
mpMetaFile->AddAction( new MetaTextArrayAction( rStartPt, rStr, pDXAry, nIndex, nLen ) );
else
@@ -7417,12 +7418,14 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
if ( !IsDeviceOutputNecessary() ) return aSysLayoutData;
- SalLayout* rLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true );
+ SalLayout* pLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true );
+
+ if ( !pLayout ) return aSysLayoutData;
// setup glyphs
Point aPos;
sal_GlyphId aGlyphId;
- for( int nStart = 0; rLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); )
+ for( int nStart = 0; pLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); )
{
// NOTE: Windows backend is producing unicode chars (ucs4), so on windows,
// ETO_GLYPH_INDEX is unusable, unless extra glyph conversion is made.
@@ -7437,9 +7440,9 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
}
// Get font data
- aSysLayoutData.orientation = rLayout->GetOrientation();
+ aSysLayoutData.orientation = pLayout->GetOrientation();
- rLayout->Release();
+ pLayout->Release();
return aSysLayoutData;
}