Преглед изворни кода

closes https://github.com/assimp/assimp/issues/2627 - fix typo

Remove code from ai_assert test, will be removed in release versions.
Kim Kulling пре 6 година
родитељ
комит
a1254f067e
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      code/glTF/glTFExporter.cpp

+ 4 - 1
code/glTF/glTFExporter.cpp

@@ -242,7 +242,10 @@ inline Ref<Accessor> ExportData(Asset& a, std::string& meshName, Ref<Buffer>& bu
 
 namespace {
     void GetMatScalar(const aiMaterial* mat, float& val, const char* propName, int type, int idx) {
-        ai_assert(mat->Get(propName, type, idx, val) == AI_SUCCESS);
+        ai_assert( nullptr != mat );
+        if ( nullptr != mat ) {
+            mat->Get(propName, type, idx, val);
+        }
     }
 }