From d702ed379db15be1c5a702a5606ec3ca633415f0 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 22 Jun 2006 08:35:50 +0000 Subject: [PATCH] ok, so the old ~FGFontCache() was useless. But at least it didn't call the buggy ~fnt(), causing an abort() ... ;-) (Only loaded texture fonts (*.txf) have a new'ed puFont. The built-in pixmap fonts don't, and may, thus, not be deleted.) --- src/GUI/new_gui.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 0957564f4..352024a66 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -295,7 +295,7 @@ class FGFontCache { private: struct fnt { fnt(puFont *pu = 0) : pufont(pu), texfont(0) {} - ~fnt() { delete pufont; delete texfont; } + ~fnt() { if (texfont) { delete pufont; delete texfont; } } puFont *pufont; fntTexFont *texfont; }; -- 2.39.5