#include <Main/fg_props.hxx>
+#if defined(SG_UNIX) && !defined(SG_MAC)
+#include "GL/glx.h"
+#endif
+
#include "menubar.hxx"
#include "dialog.hxx"
extern puFont FONT_HELVETICA_14;
extern puFont FONT_SANS_12B;
+using std::map;
+using std::string;
-
-\f
////////////////////////////////////////////////////////////////////////
// Implementation of NewGUI.
////////////////////////////////////////////////////////////////////////
continue;
}
string name = nameprop->getStringValue();
- if (_dialog_props[name])
- delete (SGPropertyNode *)_dialog_props[name];
-
_dialog_props[name] = props;
}
}
FGFontCache::~FGFontCache()
{
+#if defined(SG_UNIX) && !defined(SG_MAC)
+ // 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;