Changeset 3309

Show
Ignore:
Timestamp:
08/23/04 10:44:47 (10 years ago)
Author:
robert
Message:

Added protection to prevent crashes on calls when no data is set up

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgTerrain/DataSet.cpp

    r3292 r3309  
    5656CoordinateSystemType getCoordinateSystemType(const osg::CoordinateSystemNode* lhs) 
    5757{ 
     58    if (!lhs) return PROJECTED; 
     59 
    5860    // set up LHS SpatialReference 
    5961    char* projection_string = strdup(lhs->getCoordinateSystem().c_str()); 
     
    32533255void DataSet::computeDestinationGraphFromSources(unsigned int numLevels) 
    32543256{ 
     3257    if (!_sourceGraph) return; 
    32553258 
    32563259    // ensure we have a valid coordinate system 
     
    33763379void DataSet::updateSourcesForDestinationGraphNeeds() 
    33773380{ 
     3381    if (!_destinationGraph || !_sourceGraph) return; 
     3382 
    33783383 
    33793384    std::string temporyFilePrefix("temporaryfile_"); 
     
    34883493void DataSet::populateDestinationGraphFromSources() 
    34893494{ 
     3495    if (!_destinationGraph || !_sourceGraph) return; 
     3496 
    34903497    osg::notify(osg::NOTICE)<<std::endl<<"started DataSet::populateDestinationGraphFromSources)"<<std::endl; 
    34913498