mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +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);
|
||||
|
||||
for (uint i = 0; i < pattables.size(); ++i) {
|
||||
if (pattables[i]->getDefaultAction() == PATTable::kActionExit) {
|
||||
Common::Point hotspot = getAnim()->getHotspotPosition(i);
|
||||
if (hotspot != invalidPosition) {
|
||||
hotspot += _renderEntry->getPosition();
|
||||
positions.push_back(hotspot);
|
||||
}
|
||||
if (pattables[i]->getDefaultAction() != PATTable::kActionExit) continue;
|
||||
|
||||
Anim *anim = getAnim();
|
||||
if (!anim) continue;
|
||||
|
||||
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