fix init of aiString

iamAdrianIusca-master
Kim Kulling 2020-07-24 11:58:51 +02:00 committed by GitHub
parent 0be78e0ca3
commit 608e3102a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ SkeletonMeshBuilder::SkeletonMeshBuilder(aiScene *pScene, aiNode *root, bool bKn
return; return;
} }
if (!root) { if (nullptr != root) {
root = pScene->mRootNode; root = pScene->mRootNode;
} }
@ -251,7 +251,8 @@ aiMaterial *SkeletonMeshBuilder::CreateMaterial() {
aiMaterial *matHelper = new aiMaterial; aiMaterial *matHelper = new aiMaterial;
// Name // Name
aiString matName(std::string("SkeletonMaterial")); aiString matName;
matName.Set(std::string("SkeletonMaterial"));
matHelper->AddProperty(&matName, AI_MATKEY_NAME); matHelper->AddProperty(&matName, AI_MATKEY_NAME);
aiString matName("SkeletonMaterial"); aiString matName("SkeletonMaterial");
matHelper->AddProperty( &matName, AI_MATKEY_NAME); matHelper->AddProperty( &matName, AI_MATKEY_NAME);