1
0
Fork 0

View tweaks to try to understand crash with no camera group

Sentry-Id: FLIGHTGEAR-H9F
This commit is contained in:
James Turner 2021-03-23 17:08:34 +00:00
parent 344058baba
commit 1ee8b9e568
2 changed files with 6 additions and 0 deletions

View file

@ -438,6 +438,7 @@ void fgOSCloseWindow()
}
}
FGScenery::resetPagerSingleton();
flightgear::addSentryBreadcrumb("fgOSCloseWindow, clearing camera group", "info");
flightgear::CameraGroup::setDefault(NULL);
WindowSystemAdapter::setWSA(NULL);
viewer = NULL;

View file

@ -177,6 +177,11 @@ FGViewMgr::update (double dt)
// update the camera now
osg::ref_ptr<flightgear::CameraGroup> cameraGroup = flightgear::CameraGroup::getDefault();
if (!cameraGroup) {
// attempting to diagnose the cause of FLIGHTGEAR-H9F
throw sg_exception("FGViewMgr::update: no camera group exists");
}
if (cameraGroup) {
cameraGroup->setCameraParameters(currentView->get_v_fov(),
cameraGroup->getMasterAspectRatio());