From 168225ebafa034df996955ec0bd017152cc5eab1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Nov 2005 11:27:25 +0000 Subject: [PATCH] From Toshiyuki Takahei, fixed order intialiation problem in Viewer::selectCameraManipulator(..). --- src/osgProducer/Viewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgProducer/Viewer.cpp b/src/osgProducer/Viewer.cpp index 37d14963f..834748a4c 100644 --- a/src/osgProducer/Viewer.cpp +++ b/src/osgProducer/Viewer.cpp @@ -956,7 +956,8 @@ void Viewer::selectCameraManipulator(unsigned int no) // so we'll do this mannually. Note pretty, and needs replacing by a refactor // of MatrixMinpulators in the longer term. osg::ref_ptr ea = new EventAdapter; - ea->adaptKeyPress(_kbmcb->getTime(), osgGA::GUIEventAdapter::KEY_KP_1+no); + double time = _kbmcb.valid() ? _kbmcb->getTime() : 0.0; + ea->adaptKeyPress(time, osgGA::GUIEventAdapter::KEY_KP_1+no); _keyswitchManipulator->init(*ea, *this); } }