Added check to init to prevent crash when no camera manipulator is supplied.
This commit is contained in:
@@ -116,7 +116,11 @@ void SimpleViewer::init()
|
||||
{
|
||||
osg::ref_ptr<osgGA::GUIEventAdapter> initEvent = _eventQueue->createEvent();
|
||||
initEvent->setEventType(osgGA::GUIEventAdapter::FRAME);
|
||||
_cameraManipulator->init(*initEvent, *this);
|
||||
|
||||
if (_cameraManipulator.valid())
|
||||
{
|
||||
_cameraManipulator->init(*initEvent, *this);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleViewer::frame()
|
||||
|
||||
Reference in New Issue
Block a user