Merge pull request #2667 from theakman2/issue_2661

Fix: memory leak in gltf2 importer (fixes #2661)
pull/2669/head^2 v5.0.0
Kim Kulling 2019-09-24 19:28:59 +02:00 committed by GitHub
commit 2d2889f73f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -444,7 +444,6 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r)
"\" does not match the vertex count"); "\" does not match the vertex count");
continue; continue;
} }
aim->mColors[c] = new aiColor4D[attr.color[c]->count];
attr.color[c]->ExtractData(aim->mColors[c]); attr.color[c]->ExtractData(aim->mColors[c]);
} }
for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) { for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {