mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Fixed potential bug when item doesn't have a payload
This commit is contained in:
parent
6acff216d9
commit
3227b9d64a
1 changed files with 6 additions and 4 deletions
|
@ -118,8 +118,9 @@ void MetaToSubItems::run(const RenderContextPointer& renderContext, const ItemBo
|
|||
|
||||
for (auto idBound : inItems) {
|
||||
auto& item = scene->getItem(idBound.id);
|
||||
|
||||
item.fetchMetaSubItems(outItems);
|
||||
if (item.exist()) {
|
||||
item.fetchMetaSubItems(outItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,8 +133,9 @@ void IDsToBounds::run(const RenderContextPointer& renderContext, const ItemIDs&
|
|||
if (!_disableAABBs) {
|
||||
for (auto id : inItems) {
|
||||
auto& item = scene->getItem(id);
|
||||
|
||||
outItems.emplace_back(ItemBound{ id, item.getBound() });
|
||||
if (item.exist()) {
|
||||
outItems.emplace_back(ItemBound{ id, item.getBound() });
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (auto id : inItems) {
|
||||
|
|
Loading…
Reference in a new issue