From Colin McDonald, "Reading from a stream the 3ds plugin crashes if the options are null."

This commit is contained in:
Robert Osfield
2009-11-20 11:43:53 +00:00
parent f5b61191ad
commit d55f447188

View File

@@ -499,7 +499,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriter3DS::constructFrom3dsFile(Lib3dsFile
ReaderObject reader;
reader._directory = options->getDatabasePathList().empty() ? osgDB::getFilePath(fileName) : options->getDatabasePathList().front();
reader._directory = ( options && !options->getDatabasePathList().empty() ) ? options->getDatabasePathList().front() : osgDB::getFilePath(fileName);
osg::Group* group = new osg::Group;
group->setName(fileName);