From 6a2cd1c91d7f4a09ad048a6cb2545e6db0112861 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 28 Nov 2017 10:14:23 +0100 Subject: [PATCH] Update D3MFExporter.cpp Fix the build --- code/D3MFExporter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/D3MFExporter.cpp b/code/D3MFExporter.cpp index 71d5e8256..16889720a 100644 --- a/code/D3MFExporter.cpp +++ b/code/D3MFExporter.cpp @@ -55,7 +55,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { void ExportScene3MF( const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/ ) { - D3MF::D3MFExporter myExporter( pFile, pIOSystem, pScene ); + if ( nullptr == pIOSystem ) { + throw DeadlyExportError( "Could not export 3MP archive: " + std::string( pFile ) ); + } + D3MF::D3MFExporter myExporter( pFile, pScene ); if ( myExporter.validate() ) { bool ok = myExporter.exportArchive(pFile); if ( !ok ) {