Merge pull request #3540 from wasd845/master
_dest may be destructed twice if _dest is not null in MergeScenes()pull/3555/head
commit
102d380711
|
@ -183,9 +183,10 @@ void SceneCombiner::MergeScenes(aiScene **_dest, std::vector<aiScene *> &src, un
|
|||
*_dest = src[0];
|
||||
return;
|
||||
}
|
||||
if (*_dest)
|
||||
if (*_dest) {
|
||||
(*_dest)->~aiScene();
|
||||
else
|
||||
new (*_dest) aiScene();
|
||||
} else
|
||||
*_dest = new aiScene();
|
||||
|
||||
// Create a dummy scene to serve as master for the others
|
||||
|
|
Loading…
Reference in New Issue