From 978a577ea2091106b59b9d039571d96037707772 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sat, 1 Oct 2011 09:50:34 +0200 Subject: [PATCH] Ugly workaround for a crash on exit with multiple screens --- src/GUI/new_gui.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 5d52b1c1d..ce4c7237d 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -22,6 +22,10 @@ #include
+#ifndef _WIN32 +#include "GL/glx.h" +#endif + #include "menubar.hxx" #include "dialog.hxx" @@ -417,6 +421,11 @@ FGFontCache::FGFontCache() : FGFontCache::~FGFontCache() { +#ifndef _WIN32 + // Ugly workaround for a crash on exit with multiple screens configured + if (!glXGetCurrentContext()) + return; +#endif PuFontMap::iterator it, end = _puFonts.end(); for (it = _puFonts.begin(); it != end; ++it) delete it->second; -- 2.39.5