Merge pull request from ZappoMan/fixRenderItemLeak

fix render item leak on Model::reset()
This commit is contained in:
Brad Davis 2015-11-09 17:34:18 -08:00
commit 1d693ffd66

View file

@ -135,9 +135,6 @@ void Model::reset() {
const FBXGeometry& geometry = _geometry->getFBXGeometry();
_rig->reset(geometry.joints);
}
_meshGroupsKnown = false;
_readyWhenAdded = false; // in case any of our users are using scenes
invalidCalculatedMeshBoxes(); // if we have to reload, we need to assume our mesh boxes are all invalid
}
bool Model::updateGeometry() {
@ -1156,6 +1153,9 @@ void Model::segregateMeshGroups() {
return;
}
Q_ASSERT(_renderItems.isEmpty()); // We should not have any existing renderItems if we enter this section of code
Q_ASSERT(_renderItemsSet.isEmpty()); // We should not have any existing renderItemsSet if we enter this section of code
_renderItemsSet.clear();
// Run through all of the meshes, and place them into their segregated, but unsorted buckets