Added check for extension.

This commit is contained in:
Robert Osfield
2004-11-18 11:53:51 +00:00
parent 36661a33d3
commit 7b543a5009

View File

@@ -113,6 +113,9 @@ class OSGReaderWriter : public ReaderWriter
virtual WriteResult writeObject(const Object& obj,const std::string& fileName, const osgDB::ReaderWriter::Options* options)
{
std::string ext = osgDB::getLowerCaseFileExtension(fileName);
if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
Output fout(fileName.c_str());
if (fout)
{