]> git.mxchange.org Git - flightgear.git/blobdiff - utils/fgpanel/panel.cxx
fgpanel: fixed some error handling/setup issues
[flightgear.git] / utils / fgpanel / panel.cxx
index 89044997f1d680ffa23d8693393e82461ee9c88a..06a6159dbf99c4dea80f84682243c366419d3f7e 100644 (file)
 
 #include <simgear/compiler.h>
 
+#if defined (SG_MAC)
+#include <GLUT/glut.h>
+#else
 #include <GL/glut.h>
+#endif
 
 #include <plib/fnt.h>
 
 #include <simgear/debug/logstream.hxx>
+#include <simgear/math/SGMath.hxx>
 #include <simgear/misc/sg_path.hxx>
 
 #include "panel.hxx"
@@ -799,6 +804,11 @@ FGTextLayer::draw ()
     transform();
 
     text_renderer.setFont(ApplicationProperties::fontCache.getTexFont(_font_name.c_str()));
+    if (!text_renderer.getFont())
+    {
+        SG_LOG( SG_COCKPIT, SG_ALERT, "Missing font file: " << _font_name );
+        return;
+    }
 
     text_renderer.setPointSize(_pointSize);
     text_renderer.begin();