Show
Ignore:
Timestamp:
03/23/09 16:47:01 (5 years ago)
Author:
robert
Message:

From Csaba Halasz, "here is another division by zero fix, this should be simpler ;)
It caused problem if the stats display was popped up before the pager
had anything to do."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgDB/DatabasePager

    r9351 r9947  
    329329 
    330330        /** Get the average time between the first request for a tile to be loaded and the time of its merge into the main scene graph.*/ 
    331         double getAverageTimeToMergeTiles() const { return _totalTimeToMergeTiles/static_cast<double>(_numTilesMerges); } 
     331        double getAverageTimeToMergeTiles() const { return (_numTilesMerges > 0) ? _totalTimeToMergeTiles/static_cast<double>(_numTilesMerges) : 0; } 
    332332 
    333333        /** Reset the Stats variables.*/