diff --git a/src/item.c b/src/item.c index b3d0125..b5d8f34 100644 --- a/src/item.c +++ b/src/item.c @@ -42,14 +42,13 @@ void item_destroy(Item *item) { LinkedList *items; - Item *subitem; if (item->sprite) sprite_destroy(item->sprite); items = item->items; while (items != NULL) { - subitem = items->data; + Item *subitem = items->data; items->data = NULL; items = items->next; item_destroy(subitem);