fix hang on exit when multithreaded (bug 1830)
This commit is contained in:
parent
bd9e43e613
commit
34394c91a9
1 changed files with 8 additions and 0 deletions
|
@ -362,6 +362,14 @@ void fgOSInit(int* argc, char** argv)
|
|||
|
||||
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();
|
||||
flightgear::CameraGroup::setDefault(NULL);
|
||||
WindowSystemAdapter::setWSA(NULL);
|
||||
|
|
Loading…
Reference in a new issue