From: ThorstenB Date: Sun, 22 May 2011 20:56:51 +0000 (+0200) Subject: #323: Bad init sequence could segfault X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bdeeab84533db1430f51c0ba1ebc9f31081880cd;p=flightgear.git #323: Bad init sequence could segfault Oops, early window event callbacks could trigger issues on some systems. Fixes an issue caused by my commit 473d1447c330780ecac8a12a2d0b35c4eebdde41 --- diff --git a/src/Main/fg_os_osgviewer.cxx b/src/Main/fg_os_osgviewer.cxx index a8b88db43..357661be7 100644 --- a/src/Main/fg_os_osgviewer.cxx +++ b/src/Main/fg_os_osgviewer.cxx @@ -272,7 +272,6 @@ void fgOSExit(int code) int fgOSMainLoop() { - globals->get_renderer()->init(); ref_ptr 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); }