projects
/
platform
/
upstream
/
assimp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f16ed9
)
AMFImporter: Fix memory leak
author
Turo Lamminen
<turotl@gmail.com>
Thu, 5 Oct 2017 09:09:26 +0000
(12:09 +0300)
committer
Turo Lamminen
<turotl@gmail.com>
Fri, 6 Oct 2017 15:23:28 +0000
(18:23 +0300)
code/AMFImporter_Postprocess.cpp
patch
|
blob
|
history
diff --git
a/code/AMFImporter_Postprocess.cpp
b/code/AMFImporter_Postprocess.cpp
index
085336c
..
789a11e
100644
(file)
--- a/
code/AMFImporter_Postprocess.cpp
+++ b/
code/AMFImporter_Postprocess.cpp
@@
-686,7
+686,6
@@
std::list<unsigned int> mesh_idx;
tmesh->mNumVertices = static_cast<unsigned int>(vert_arr.size());
tmesh->mVertices = new aiVector3D[tmesh->mNumVertices];
tmesh->mColors[0] = new aiColor4D[tmesh->mNumVertices];
- tmesh->mFaces = new aiFace[face_list_cur.size()];
memcpy(tmesh->mVertices, vert_arr.data(), tmesh->mNumVertices * sizeof(aiVector3D));
memcpy(tmesh->mColors[0], col_arr.data(), tmesh->mNumVertices * sizeof(aiColor4D));