Explorar o código

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

Petar Popovic hai 1 ano
pai
achega
045a4492f1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      test/testaudio.c

+ 1 - 0
test/testaudio.c

@@ -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);