test/testaudio.c: Fix use-after-free warning

This commit is contained in:
Petar Popovic
2025-02-17 04:06:50 +01:00
committed by Sam Lantinga
parent da2460f9e7
commit 045a4492f1

View File

@@ -300,6 +300,7 @@ static void DestroyThing(Thing *thing)
}
if (thing->prev) {
SDL_assert(thing != things);
thing->prev->next = thing->next;
} else {
SDL_assert(thing == things);