Added handling of NULL

This commit is contained in:
Robert Osfield 2016-06-30 07:59:51 +01:00
parent ac136d92e7
commit de6eb1d97e

View File

@ -495,7 +495,13 @@ osgDB::ReaderWriter::ReadResult ReaderWriterSTL::readNode(const std::string& fil
if (!isBinary)
{
fclose(fp);
fp = osgDB::fopen(fileName.c_str(), "r");
if (!fp)
{
return ReadResult::FILE_NOT_FOUND;
}
}
osg::ref_ptr<osg::Group> group = new osg::Group;