[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/video font.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/video font.c |
Date: |
14 Jan 2004 16:33:28 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/14 16:33:28
Modified files:
src/video : font.c
Log message:
Fix memory leak from loading fonts more than once
Patches:
Index: stratagus/src/video/font.c
diff -u stratagus/src/video/font.c:1.73 stratagus/src/video/font.c:1.74
--- stratagus/src/video/font.c:1.73 Sat Jan 10 14:28:47 2004
+++ stratagus/src/video/font.c Wed Jan 14 16:33:27 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: font.c,v 1.73 2004/01/10 03:28:47 jsalmon3 Exp $
+// $Id: font.c,v 1.74 2004/01/14 05:33:27 jsalmon3 Exp $
//@{
@@ -1045,8 +1045,8 @@
#endif
#endif
- for (i = 0; i<sizeof(Fonts) / sizeof(*Fonts); ++i) {
- if (Fonts[i].File) {
+ for (i = 0; i < sizeof(Fonts) / sizeof(*Fonts); ++i) {
+ if (Fonts[i].File && !Fonts[i].Graphic) {
ShowLoadProgress("Fonts %s", Fonts[i].File);
Fonts[i].Graphic = LoadGraphic(Fonts[i].File);
FontMeasureWidths(Fonts + i);