If caller provides no ExportProperties, pass a pointer to empty properties to the Exporter implementation (instead of a NULL).

This commit is contained in:
Alexander Gessler
2015-03-16 23:09:41 +01:00
committed by Alexander Gessler
parent 4bf090e92c
commit adc44d1e83

View File

@@ -397,7 +397,8 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
proc.Execute(scenecopy.get());
}
exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties);
ExportProperties emptyProperties; // Never pass NULL ExportProperties so Exporters don't have to worry.
exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties ? pProperties : &emptyProperties);
}
catch (DeadlyExportError& err) {
pimpl->mError = err.what();