瀏覽代碼

https://github.com/assimp/assimp/issues/714: fix null pointer access with
unknown texture.

Kim Kulling 9 年之前
父節點
當前提交
9409ce3b56
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      code/ObjFileMtlImporter.cpp

+ 3 - 1
code/ObjFileMtlImporter.cpp

@@ -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 );
+    }
 }
 
 /* /////////////////////////////////////////////////////////////////////////////