From 9409ce3b56f768a3dec09c7653ea8384dbbe10ed Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 27 Dec 2015 00:19:11 +0100 Subject: [PATCH] https://github.com/assimp/assimp/issues/714: fix null pointer access with unknown texture. --- code/ObjFileMtlImporter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp index 6653b30ce..8079dad28 100644 --- a/code/ObjFileMtlImporter.cpp +++ b/code/ObjFileMtlImporter.cpp @@ -358,7 +358,9 @@ void ObjFileMtlImporter::getTexture() { std::string texture; m_DataIt = getName( m_DataIt, m_DataItEnd, texture ); - out->Set( texture ); + if ( NULL!=out ) { + out->Set( texture ); + } } /* /////////////////////////////////////////////////////////////////////////////