diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 10:45:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 12:58:44 +0000 |
commit | 3a1671b35198316af21f8f2d62233aa66e4b30f0 (patch) | |
tree | d64595659c2697476ad62d201861b8313e82f40d /vcl | |
parent | 8a21d42426ad37cd06a7aac98aa2fa59403a5a97 (diff) |
coverity#1187674 Dereference null return value
Change-Id: I4fdf0e324463285d086c1503214e2aee0c0537e8
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index ae82903b9a71..d976ad196501 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -1757,14 +1757,14 @@ void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const { 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 if( pFont->m_eType == fonttype::TrueType ) analyzeTrueTypeFile( pFont ); } - if( ! pFont->m_bHaveVerticalSubstitutedGlyphs ) + if (!pFont || !pFont->m_bHaveVerticalSubstitutedGlyphs) memset( pHasSubst, 0, sizeof(bool)*nCharacters ); else { |