Fix getting elevation of freed object
This commit is contained in:
parent
c0908cf14f
commit
737076a126
|
@ -1578,7 +1578,6 @@ static int _anim_set_end(int animationSequenceIndex)
|
||||||
AnimationSequence* animationSequence;
|
AnimationSequence* animationSequence;
|
||||||
AnimationDescription* animationDescription;
|
AnimationDescription* animationDescription;
|
||||||
int i;
|
int i;
|
||||||
Rect v27;
|
|
||||||
|
|
||||||
if (animationSequenceIndex == -1) {
|
if (animationSequenceIndex == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1599,8 +1598,10 @@ static int _anim_set_end(int animationSequenceIndex)
|
||||||
for (i = 0; i < animationSequence->length; i++) {
|
for (i = 0; i < animationSequence->length; i++) {
|
||||||
animationDescription = &(animationSequence->animations[i]);
|
animationDescription = &(animationSequence->animations[i]);
|
||||||
if (animationDescription->kind == ANIM_KIND_HIDE && ((i < animationSequence->animationIndex) || (animationDescription->extendedFlags & ANIMATION_SEQUENCE_FORCED))) {
|
if (animationDescription->kind == ANIM_KIND_HIDE && ((i < animationSequence->animationIndex) || (animationDescription->extendedFlags & ANIMATION_SEQUENCE_FORCED))) {
|
||||||
objectDestroy(animationDescription->owner, &v27);
|
Rect rect;
|
||||||
tileWindowRefreshRect(&v27, animationDescription->owner->elevation);
|
int elevation = animationDescription->owner->elevation;
|
||||||
|
objectDestroy(animationDescription->owner, &rect);
|
||||||
|
tileWindowRefreshRect(&rect, elevation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue