From 608e3102a073011999d3d0afcfec22eece6595d5 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 24 Jul 2020 11:58:51 +0200 Subject: [PATCH] fix init of aiString --- code/Common/SkeletonMeshBuilder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/Common/SkeletonMeshBuilder.cpp b/code/Common/SkeletonMeshBuilder.cpp index 97b811e16..9b50fbf43 100644 --- a/code/Common/SkeletonMeshBuilder.cpp +++ b/code/Common/SkeletonMeshBuilder.cpp @@ -57,7 +57,7 @@ SkeletonMeshBuilder::SkeletonMeshBuilder(aiScene *pScene, aiNode *root, bool bKn return; } - if (!root) { + if (nullptr != root) { root = pScene->mRootNode; } @@ -251,7 +251,8 @@ aiMaterial *SkeletonMeshBuilder::CreateMaterial() { aiMaterial *matHelper = new aiMaterial; // Name - aiString matName(std::string("SkeletonMaterial")); + aiString matName; + matName.Set(std::string("SkeletonMaterial")); matHelper->AddProperty(&matName, AI_MATKEY_NAME); aiString matName("SkeletonMaterial"); matHelper->AddProperty( &matName, AI_MATKEY_NAME);