Remove some memory leaks

This commit is contained in:
Linus_Probert 2018-03-06 10:27:25 +01:00
parent c5abf71735
commit bac0c62a10
1 changed files with 4 additions and 0 deletions

View File

@ -217,5 +217,9 @@ skillbar_destroy(SkillBar *bar)
{ {
while (bar->sprites) while (bar->sprites)
sprite_destroy(linkedlist_pop(&bar->sprites)); sprite_destroy(linkedlist_pop(&bar->sprites));
for (unsigned int i = 0; i < PLAYER_SKILL_COUNT; ++i)
if (bar->countdowns[i])
sprite_destroy(bar->countdowns[i]);
timer_destroy(bar->activationTimer);
free(bar); free(bar);
} }