test/testaudio.c: Fix use-after-free warning
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions

This commit is contained in:
Petar Popovic
2025-02-17 04:06:50 +01:00
committed by Sam Lantinga
parent da2460f9e7
commit 045a4492f1
+1
View File
@@ -300,6 +300,7 @@ static void DestroyThing(Thing *thing)
} }
if (thing->prev) { if (thing->prev) {
SDL_assert(thing != things);
thing->prev->next = thing->next; thing->prev->next = thing->next;
} else { } else {
SDL_assert(thing == things); SDL_assert(thing == things);