Kaydet (Commit) 3a1671b3 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1187674 Dereference null return value

Change-Id: I4fdf0e324463285d086c1503214e2aee0c0537e8
üst 8a21d424
...@@ -1757,14 +1757,14 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, ...@@ -1757,14 +1757,14 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID,
const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const
{ {
PrintFont* pFont = getFont( nFontID ); PrintFont* pFont = getFont( nFontID );
if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
{ {
// might be a truetype font not yet analyzed // might be a truetype font not yet analyzed
if( pFont->m_eType == fonttype::TrueType ) if( pFont->m_eType == fonttype::TrueType )
analyzeTrueTypeFile( pFont ); analyzeTrueTypeFile( pFont );
} }
if( ! pFont->m_bHaveVerticalSubstitutedGlyphs ) if (!pFont || !pFont->m_bHaveVerticalSubstitutedGlyphs)
memset( pHasSubst, 0, sizeof(bool)*nCharacters ); memset( pHasSubst, 0, sizeof(bool)*nCharacters );
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment