mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,8 +133,9 @@ 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) {
|
||||||
|
|
Loading…
Reference in a new issue