From b42d959418a3969ed9858567c68eb752831282d3 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 30 Dec 2018 16:02:22 +0100 Subject: [PATCH] fix review warning: wrapper object used after free. --- code/glTFExporter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 29a88af8b..5d00c9178 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -101,17 +101,17 @@ glTFExporter::glTFExporter(const char* filename, IOSystem* pIOSystem, const aiSc { aiScene* sceneCopy_tmp; SceneCombiner::CopyScene(&sceneCopy_tmp, pScene); - std::unique_ptr sceneCopy(sceneCopy_tmp); + aiScene *sceneCopy(sceneCopy_tmp); SplitLargeMeshesProcess_Triangle tri_splitter; tri_splitter.SetLimit(0xffff); - tri_splitter.Execute(sceneCopy.get()); + tri_splitter.Execute(sceneCopy); SplitLargeMeshesProcess_Vertex vert_splitter; vert_splitter.SetLimit(0xffff); - vert_splitter.Execute(sceneCopy.get()); + vert_splitter.Execute(sceneCopy); - mScene = sceneCopy.get(); + mScene = sceneCopy; mAsset.reset( new glTF::Asset( pIOSystem ) );