]> git.mxchange.org Git - flightgear.git/commitdiff
ok, so the old ~FGFontCache() was useless. But at least it didn't call
authormfranz <mfranz>
Thu, 22 Jun 2006 08:35:50 +0000 (08:35 +0000)
committermfranz <mfranz>
Thu, 22 Jun 2006 08:35:50 +0000 (08:35 +0000)
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

index 0957564f44474a7c80ea8943f076d6dd9a259230..352024a66b07511f153e3b4602dee0962979b54b 100644 (file)
@@ -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;
     };