]> git.mxchange.org Git - flightgear.git/commitdiff
#323: Bad init sequence could segfault
authorThorstenB <brehmt@gmail.com>
Sun, 22 May 2011 20:56:51 +0000 (22:56 +0200)
committerThorstenB <brehmt@gmail.com>
Sun, 22 May 2011 20:56:51 +0000 (22:56 +0200)
Oops, early window event callbacks could trigger issues on some systems.
Fixes an issue caused by my commit 473d1447c330780ecac8a12a2d0b35c4eebdde41

src/Main/fg_os_osgviewer.cxx

index a8b88db43616eb84558ec3c3ebae1b6e46bfd8da..357661be7861f0fffd77b8aceb97d81a9dcac869 100644 (file)
@@ -272,7 +272,6 @@ void fgOSExit(int code)
 
 int fgOSMainLoop()
 {
-    globals->get_renderer()->init();
     ref_ptr<FGEventHandler> manipulator
         = globals->get_renderer()->getEventHandler();
     viewer->setReleaseContextAtEndOfFrameHint(false);
@@ -307,6 +306,7 @@ void fgWarpMouse(int x, int y)
 
 void fgOSInit(int* argc, char** argv)
 {
+    globals->get_renderer()->init();
     WindowSystemAdapter::setWSA(new WindowSystemAdapter);
 }