Project

General

Profile

Bug #2424 ยป 0087-Fix-client-crash-on-exit-when-movement-animations-st.patch

Marko Lindqvist, 10/26/2026 09:52 PM

View differences:

client/mapview_common.c
for (i = 0; i < last; i++) {
struct animation *anim = animation_list_get(animations, i);
switch (anim->type) {
case ANIM_MOVEMENT:
unit_virtual_destroy(anim->movement.mover);
break;
case ANIM_BATTLE:
unit_virtual_destroy(anim->battle.virt_winner);
unit_virtual_destroy(anim->battle.virt_loser);
break;
case ANIM_EXPL:
case ANIM_NUKE:
/* Nothing to free */
break;
/* Finished animation has virtual units already destroyed */
if (!anim->finished) {
switch (anim->type) {
case ANIM_MOVEMENT:
unit_virtual_destroy(anim->movement.mover);
break;
case ANIM_BATTLE:
unit_virtual_destroy(anim->battle.virt_winner);
unit_virtual_destroy(anim->battle.virt_loser);
break;
case ANIM_EXPL:
case ANIM_NUKE:
/* Nothing to free */
break;
}
}
free(anim);
    (1-1/1)