mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:17:35 +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,9 +118,10 @@ void MetaToSubItems::run(const RenderContextPointer& renderContext, const ItemBo
|
||||||
|
|
||||||
for (auto idBound : inItems) {
|
for (auto idBound : inItems) {
|
||||||
auto& item = scene->getItem(idBound.id);
|
auto& item = scene->getItem(idBound.id);
|
||||||
|
if (item.exist()) {
|
||||||
item.fetchMetaSubItems(outItems);
|
item.fetchMetaSubItems(outItems);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDsToBounds::run(const RenderContextPointer& renderContext, const ItemIDs& inItems, ItemBounds& outItems) {
|
void IDsToBounds::run(const RenderContextPointer& renderContext, const ItemIDs& inItems, ItemBounds& outItems) {
|
||||||
|
@ -132,9 +133,10 @@ void IDsToBounds::run(const RenderContextPointer& renderContext, const ItemIDs&
|
||||||
if (!_disableAABBs) {
|
if (!_disableAABBs) {
|
||||||
for (auto id : inItems) {
|
for (auto id : inItems) {
|
||||||
auto& item = scene->getItem(id);
|
auto& item = scene->getItem(id);
|
||||||
|
if (item.exist()) {
|
||||||
outItems.emplace_back(ItemBound{ id, item.getBound() });
|
outItems.emplace_back(ItemBound{ id, item.getBound() });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (auto id : inItems) {
|
for (auto id : inItems) {
|
||||||
outItems.emplace_back(ItemBound{ id });
|
outItems.emplace_back(ItemBound{ id });
|
||||||
|
|
Loading…
Reference in a new issue