mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
STARK: Fix crash when showing exits for items with no animation set
Fixes #1531.
This commit is contained in:
parent
10c4458976
commit
b91c4cdf71
@ -409,12 +409,15 @@ Common::Array<Common::Point> ItemVisual::listExitPositionsImpl() {
|
|||||||
Common::Point invalidPosition(-1, -1);
|
Common::Point invalidPosition(-1, -1);
|
||||||
|
|
||||||
for (uint i = 0; i < pattables.size(); ++i) {
|
for (uint i = 0; i < pattables.size(); ++i) {
|
||||||
if (pattables[i]->getDefaultAction() == PATTable::kActionExit) {
|
if (pattables[i]->getDefaultAction() != PATTable::kActionExit) continue;
|
||||||
Common::Point hotspot = getAnim()->getHotspotPosition(i);
|
|
||||||
if (hotspot != invalidPosition) {
|
Anim *anim = getAnim();
|
||||||
hotspot += _renderEntry->getPosition();
|
if (!anim) continue;
|
||||||
positions.push_back(hotspot);
|
|
||||||
}
|
Common::Point hotspot = anim->getHotspotPosition(i);
|
||||||
|
if (hotspot != invalidPosition) {
|
||||||
|
hotspot += _renderEntry->getPosition();
|
||||||
|
positions.push_back(hotspot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user