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
src/Viewer
|
@ -438,6 +438,7 @@ void fgOSCloseWindow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FGScenery::resetPagerSingleton();
|
FGScenery::resetPagerSingleton();
|
||||||
|
flightgear::addSentryBreadcrumb("fgOSCloseWindow, clearing camera group", "info");
|
||||||
flightgear::CameraGroup::setDefault(NULL);
|
flightgear::CameraGroup::setDefault(NULL);
|
||||||
WindowSystemAdapter::setWSA(NULL);
|
WindowSystemAdapter::setWSA(NULL);
|
||||||
viewer = NULL;
|
viewer = NULL;
|
||||||
|
|
|
@ -177,6 +177,11 @@ FGViewMgr::update (double dt)
|
||||||
|
|
||||||
// update the camera now
|
// update the camera now
|
||||||
osg::ref_ptr<flightgear::CameraGroup> cameraGroup = flightgear::CameraGroup::getDefault();
|
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) {
|
if (cameraGroup) {
|
||||||
cameraGroup->setCameraParameters(currentView->get_v_fov(),
|
cameraGroup->setCameraParameters(currentView->get_v_fov(),
|
||||||
cameraGroup->getMasterAspectRatio());
|
cameraGroup->getMasterAspectRatio());
|
||||||
|
|
Loading…
Add table
Reference in a new issue