소스 검색

Merge pull request #763 from andrewparlane/mtlFix

ObjFileMtlImporter: Fixed a segfault due to NULL ptr access.
Kim Kulling 9 년 전
부모
커밋
0e4cf64a45
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      code/ObjFileMtlImporter.cpp

+ 1 - 0
code/ObjFileMtlImporter.cpp

@@ -339,6 +339,7 @@ void ObjFileMtlImporter::getTexture() {
     } else if(!ASSIMP_strincmp( pPtr, ReflectionTexture.c_str(), ReflectionTexture.size() ) ) {
         // Reflection texture(s)
         //Do nothing here
+        return;
     } else if (!ASSIMP_strincmp( pPtr, DisplacementTexture.c_str(), DisplacementTexture.size() ) ) {
         // Displacement texture
         out = &m_pModel->m_pCurrentMaterial->textureDisp;