]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bootstrap.cxx
In the process of changing, adding and removing files the last few years
[flightgear.git] / src / Main / bootstrap.cxx
index 452e026f91d1240339bc491ae14b7b925c099bf0..814cab6017f404ce1a72cebce9592c12abb56b6d 100644 (file)
@@ -117,6 +117,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 #if defined( sgi )
 #include <sys/fpu.h>
 #include <sys/sysmp.h>
+#include <unistd.h>
 
 /*
  *  set the special "flush zero" bit (FS, bit 24) in the Control Status
@@ -194,8 +195,10 @@ int main ( int argc, char **argv ) {
                             // We must use cerr rather than
                             // logging, since logging may be
                             // disabled.
-        cerr << "Fatal error: " << t.getFormattedMessage()
-             << "\n (received from " << t.getOrigin() << ')' << endl;
+        cerr << "Fatal error: " << t.getFormattedMessage() << endl;
+        if (!t.getOrigin().empty())
+            cerr << " (received from " << t.getOrigin() << ')' << endl;
+
     } catch (...) {
         cerr << "Unknown exception in the main loop. Aborting..." << endl;
         perror("Possible cause");
@@ -211,7 +214,6 @@ void fgExitCleanup() {
     if (_bootstrap_OSInit != 0)
         fgSetMouseCursor(MOUSE_CURSOR_POINTER);
 
-    if (globals)
-        delete globals;
+    delete globals;
 }