From 7ab07eb1c041c8cad1534966ea44e6b68fef7f73 Mon Sep 17 00:00:00 2001 From: Richard Harrison <rjh@zaretto.com> Date: Tue, 22 Jan 2019 08:48:51 +0100 Subject: [PATCH] Ensure fonts list cleared in destructor. This is part of work trying to track down a segfault that is caused after a replay session (F-15). --- src/GUI/FGFontCache.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GUI/FGFontCache.cxx b/src/GUI/FGFontCache.cxx index 5473c1719..fda16272b 100644 --- a/src/GUI/FGFontCache.cxx +++ b/src/GUI/FGFontCache.cxx @@ -100,6 +100,7 @@ FGFontCache::~FGFontCache() PuFontMap::iterator it, end = _puFonts.end(); for (it = _puFonts.begin(); it != end; ++it) delete it->second; + _puFonts.clear(); } inline bool FGFontCache::FntParamsLess::operator()(const FntParams& f1,