diff options
author | Herbert Dürr <hdu@apache.org> | 2012-06-15 08:30:03 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2012-06-15 08:30:03 +0000 |
commit | c64ec7e2c6fcba73442db2a9cb8183ad9ee48930 (patch) | |
tree | 69334373936402e94ed7417fbb1d1503398fd65b /vcl/win | |
parent | 4ddba09711e20143d8b2fe97c0391ae62ca521eb (diff) |
#i119997# fix a memory leak by WinGlyphFallbackSubstitution"
Patch by: Chao Huang
Found by: Chao Huang
Review by: hdu
Notes
Notes:
merged as: 736a63b25f5744b245edc31061b4105a5e8465e0
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index a7bd0c212e3c..667166e0dc41 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -605,16 +605,20 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo if( nTestFontCount > MAX_GFBFONT_COUNT ) nTestFontCount = MAX_GFBFONT_COUNT; + bool bFound = false; for( int i = 0; i < nTestFontCount; ++i ) { const ImplFontData* pFace = pTestFontList->Get( i ); - if( !HasMissingChars( pFace, rMissingChars ) ) + bFound = HasMissingChars( pFace, rMissingChars ); + if( !bFound ) continue; rFontSelData.maSearchName = pFace->maName; - return true; + break; } - return false; + delete pTestFontList; + + return bFound; } // ======================================================================= |