From a1254f067e85b1e1d65479e50098c50e42ebf1b4 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 13 Sep 2019 12:05:29 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2627 - fix typo Remove code from ai_assert test, will be removed in release versions. --- code/glTF/glTFExporter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/glTF/glTFExporter.cpp b/code/glTF/glTFExporter.cpp index 3bd944bb6..034f91f3b 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); + } } }