Added null pointer check

This commit is contained in:
Robert Osfield 2016-06-29 17:33:45 +01:00
parent 9fe0c23af4
commit 47842987c5

View File

@ -2814,7 +2814,8 @@ class MyReadFileCallback : public virtual osgDB::ReadFileCallback
OSG_INFO<<" inserting object into file cache "<<filename<<", "<<result.getObject()<<std::endl;
_objectCache[filename] = result.getObject();
options->setPluginStringData("filename",newpath);
if (options) options->setPluginStringData("filename",newpath);
return result;
}
}