Fixed a recently introduced crash in the flt plugin which was happen when a
std::string was be be set with NULL char*. Also added support for stripping the filename from its original path, inside the osgDB::findFile function.
This commit is contained in:
@@ -91,9 +91,9 @@ Record* FltFile::readFile(const std::string& fileName)
|
||||
if (!fin.open(fileName))
|
||||
{
|
||||
// ok havn't found file, resort to using findFile...
|
||||
std::string newFileName = osgDB::findFile(fileName.c_str());
|
||||
|
||||
if (newFileName.empty()) return NULL;
|
||||
char* newFileName = osgDB::findFile(fileName.c_str());
|
||||
|
||||
if (!newFileName) return NULL;
|
||||
if (!fin.open(newFileName)) return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user