Browse Source

Merge pull request #2667 from theakman2/issue_2661

Fix: memory leak in gltf2 importer (fixes #2661)
Kim Kulling 6 năm trước cách đây
mục cha
commit
2d2889f73f
1 tập tin đã thay đổi với 0 bổ sung1 xóa
  1. 0 1
      code/glTF2/glTF2Importer.cpp

+ 0 - 1
code/glTF2/glTF2Importer.cpp

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