diff --git a/code/glTF/glTFExporter.cpp b/code/glTF/glTFExporter.cpp index 3bd944bb68..034f91f3be 100644 --- a/code/glTF/glTFExporter.cpp +++ b/code/glTF/glTFExporter.cpp @@ -242,7 +242,10 @@ inline Ref ExportData(Asset& a, std::string& meshName, Ref& 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); + } } }