ModelRegistry: Special case empty file names

Related to ticket:
https://sourceforge.net/p/flightgear/codetickets/2609/
This commit is contained in:
James Turner 2021-07-21 22:53:12 +01:00
parent 999e499ce5
commit 5f334d3839

View File

@ -733,6 +733,10 @@ ReaderWriter::ReadResult
ModelRegistry::readNode(const string& fileName,
const Options* opt)
{
if (fileName.empty()) {
return osgDB::ReaderWriter::ReadResult::FILE_NOT_HANDLED;
}
// propogate error context from the caller
simgear::ErrorReportContext ec;
auto sgopt = dynamic_cast<const SGReaderWriterOptions*>(opt);