diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index 12f768d7..f6bcee90 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -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(opt);