https://github.com/assimp/assimp/issues/714: fix null pointer access with
authorKim Kulling <kim.kulling@googlemail.com>
Sat, 26 Dec 2015 23:19:11 +0000 (00:19 +0100)
committerKim Kulling <kim.kulling@googlemail.com>
Sat, 26 Dec 2015 23:19:11 +0000 (00:19 +0100)
unknown texture.

code/ObjFileMtlImporter.cpp

index 6653b30..8079dad 100644 (file)
@@ -358,7 +358,9 @@ void ObjFileMtlImporter::getTexture() {
 
     std::string texture;
     m_DataIt = getName<DataArrayIt>( m_DataIt, m_DataItEnd, texture );
-    out->Set( texture );
+    if ( NULL!=out ) {
+        out->Set( texture );
+    }
 }
 
 /* /////////////////////////////////////////////////////////////////////////////