incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1356233 - /incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx
Date Mon, 02 Jul 2012 14:06:15 GMT
Author: hdu
Date: Mon Jul  2 14:06:14 2012
New Revision: 1356233

URL: http://svn.apache.org/viewvc?rev=1356233&view=rev
Log:
#i119997# fix a memory leak by WinGlyphFallbackSubstitution"
    
Patch by: Chao Huang
Found by: Chao Huang
Review by: hdu
    
Merged from revision 1350553 of https://svn.apache.org/repos/asf/incubator/ooo/trunk

Modified:
    incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx

Modified: incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx?rev=1356233&r1=1356232&r2=1356233&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx (original)
+++ incubator/ooo/branches/AOO34/main/vcl/win/source/gdi/salgdi3.cxx Mon Jul  2 14:06:14 2012
@@ -605,16 +605,20 @@ bool WinGlyphFallbackSubstititution::Fin
 	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;
 }
 
 // =======================================================================



Mime
View raw message