mirror of https://github.com/libsdl-org/SDL.git
test/testaudio.c: Fix use-after-free warning
This commit is contained in:
parent
da2460f9e7
commit
045a4492f1
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue