浏览代码

Merge branch 'master' into patch-1

Kim Kulling 6 年之前
父节点
当前提交
cc7ba5288c
共有 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);
+        }
     }
 }