diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 1ffed241c..31be97cec 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -1112,7 +1112,7 @@ void CompositeViewer::eventTraversal() // create a frame event for the new frame. { - osgGA::GUIEventAdapter* event = view->getEventQueue()->frame( getFrameStamp()->getReferenceTime() ); + osg::ref_ptr event = view->getEventQueue()->frame( getFrameStamp()->getReferenceTime() ); if (!_previousEvent || _previousEvent->getNumPointerData()<2) { diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index ec3e840ce..cfaf70335 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -987,7 +987,7 @@ void Viewer::eventTraversal() // create a frame event for the new frame. { - osgGA::GUIEventAdapter* event = _eventQueue->frame( getFrameStamp()->getReferenceTime() ); + osg::ref_ptr event = _eventQueue->frame( getFrameStamp()->getReferenceTime() ); if (!eventState || eventState->getNumPointerData()<2) {