mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-18 07:21:21 +02:00
Merge pull request #12948 from samcake/rc66.1-metaSubItems
RC66.1: Re apply extra sanity check that hasn't been applied correctly in rc66
This commit is contained in:
commit
a529c7cfc5
1 changed files with 9 additions and 3 deletions
|
@ -118,9 +118,15 @@ uint32_t Item::fetchMetaSubItemBounds(ItemBounds& subItemBounds, Scene& scene) c
|
|||
auto numSubs = fetchMetaSubItems(subItems);
|
||||
|
||||
for (auto id : subItems) {
|
||||
auto& item = scene.getItem(id);
|
||||
if (item.exist()) {
|
||||
subItemBounds.emplace_back(id, item.getBound());
|
||||
// TODO: Adding an extra check here even thought we shouldn't have too.
|
||||
// We have cases when the id returned by fetchMetaSubItems is not allocated
|
||||
if (scene.isAllocatedID(id)) {
|
||||
auto& item = scene.getItem(id);
|
||||
if (item.exist()) {
|
||||
subItemBounds.emplace_back(id, item.getBound());
|
||||
} else {
|
||||
numSubs--;
|
||||
}
|
||||
} else {
|
||||
numSubs--;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue