Index: /OpenSceneGraph/trunk/src/osgTerrain/DataSet.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgTerrain/DataSet.cpp (revision 3292)
+++ /OpenSceneGraph/trunk/src/osgTerrain/DataSet.cpp (revision 3309)
@@ -56,4 +56,6 @@
 CoordinateSystemType getCoordinateSystemType(const osg::CoordinateSystemNode* lhs)
 {
+    if (!lhs) return PROJECTED;
+
     // set up LHS SpatialReference
     char* projection_string = strdup(lhs->getCoordinateSystem().c_str());
@@ -3253,4 +3255,5 @@
 void DataSet::computeDestinationGraphFromSources(unsigned int numLevels)
 {
+    if (!_sourceGraph) return;
 
     // ensure we have a valid coordinate system
@@ -3376,4 +3379,6 @@
 void DataSet::updateSourcesForDestinationGraphNeeds()
 {
+    if (!_destinationGraph || !_sourceGraph) return;
+
 
     std::string temporyFilePrefix("temporaryfile_");
@@ -3488,4 +3493,6 @@
 void DataSet::populateDestinationGraphFromSources()
 {
+    if (!_destinationGraph || !_sourceGraph) return;
+
     osg::notify(osg::NOTICE)<<std::endl<<"started DataSet::populateDestinationGraphFromSources)"<<std::endl;
 
