1
0
Fork 0

Ugly workaround for a crash on exit with multiple screens

This commit is contained in:
Mathias Froehlich 2011-10-01 09:50:34 +02:00
parent af1e00ac72
commit 978a577ea2

View file

@ -22,6 +22,10 @@
#include <Main/fg_props.hxx>
#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;