1
0
Fork 0

fix hang on exit when multithreaded (bug 1830)

This commit is contained in:
Rebecca N. Palmer 2016-08-15 07:58:40 +01:00
parent bd9e43e613
commit 34394c91a9

View file

@ -362,6 +362,14 @@ void fgOSInit(int* argc, char** argv)
void fgOSCloseWindow() void fgOSCloseWindow()
{ {
if (viewer) {
// https://code.google.com/p/flightgear-bugs/issues/detail?id=1291
// https://sourceforge.net/p/flightgear/codetickets/1830/
// explicitly stop trheading before we delete the renderer or
// viewMgr (which ultimately holds refs to the CameraGroup, and
// GraphicsContext)
viewer->stopThreading();
}
FGScenery::resetPagerSingleton(); FGScenery::resetPagerSingleton();
flightgear::CameraGroup::setDefault(NULL); flightgear::CameraGroup::setDefault(NULL);
WindowSystemAdapter::setWSA(NULL); WindowSystemAdapter::setWSA(NULL);