View tweaks to try to understand crash with no camera group
Sentry-Id: FLIGHTGEAR-H9F
This commit is contained in:
parent
344058baba
commit
1ee8b9e568
2 changed files with 6 additions and 0 deletions
|
@ -438,6 +438,7 @@ void fgOSCloseWindow()
|
|||
}
|
||||
}
|
||||
FGScenery::resetPagerSingleton();
|
||||
flightgear::addSentryBreadcrumb("fgOSCloseWindow, clearing camera group", "info");
|
||||
flightgear::CameraGroup::setDefault(NULL);
|
||||
WindowSystemAdapter::setWSA(NULL);
|
||||
viewer = NULL;
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue