Changeset 9567

Show
Ignore:
Timestamp:
01/28/09 11:06:15 (6 years ago)
Author:
robert
Message:

Added check against existing of a valid Stats object in ViewerBase::renderinTraverls() to prevent crash.

Added default View Stats into src/osgViewer/View.cpp to enable stats to be collected for views

Location:
OpenSceneGraph/trunk/src/osgViewer
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgViewer/View.cpp

    r9462 r9567  
    149149 
    150150    setEventQueue(new osgGA::EventQueue); 
     151     
     152    setStats(new osg::Stats("View")); 
    151153} 
    152154 
     
    164166 
    165167    setEventQueue(new osgGA::EventQueue); 
     168 
     169    setStats(new osg::Stats("View")); 
    166170} 
    167171 
  • OpenSceneGraph/trunk/src/osgViewer/ViewerBase.cpp

    r9554 r9567  
    654654            osg::Stats* stats = view->getStats();             
    655655            osg::Node* sceneRoot = view->getSceneData(); 
    656             if (sceneRoot) 
     656            if (sceneRoot && stats) 
    657657            { 
    658658                osgUtil::StatsVisitor statsVisitor;