Browse Source

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

Alexander Gessler 10 years ago
parent
commit
adc44d1e83
1 changed files with 2 additions and 1 deletions
  1. 2 1
      code/Exporter.cpp

+ 2 - 1
code/Exporter.cpp

@@ -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();