浏览代码

Merge pull request #2978 from malortie/scene-combiner-memory-leak

Fixed mValues allocated twice in SceneCombiner.cpp.
Kim Kulling 5 年之前
父节点
当前提交
c0dc3b3f58
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      code/Common/SceneCombiner.cpp

+ 0 - 1
code/Common/SceneCombiner.cpp

@@ -1312,7 +1312,6 @@ void SceneCombiner::Copy(aiMetadata** _dest, const aiMetadata* src) {
     aiMetadata* dest = *_dest = aiMetadata::Alloc( src->mNumProperties );
     std::copy(src->mKeys, src->mKeys + src->mNumProperties, dest->mKeys);
 
-    dest->mValues = new aiMetadataEntry[src->mNumProperties];
     for (unsigned int i = 0; i < src->mNumProperties; ++i) {
         aiMetadataEntry& in = src->mValues[i];
         aiMetadataEntry& out = dest->mValues[i];