testmouse: avoid use-after-free

Bug was introduced in 17a891daa8
This commit is contained in:
Anonymous Maarten
2025-11-18 08:35:56 +01:00
parent 44471b3ea4
commit 8f21fe4994

View File

@@ -347,7 +347,7 @@ int main(int argc, char *argv[])
while (active) {
Object *next = active->next;
SDL_free(next);
SDL_free(active);
active = next;
}
SDL_DestroyRenderer(loop_data.renderer);