소스 검색

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

Petar Popovic 1 년 전
부모
커밋
045a4492f1
1개의 변경된 파일과 1개의 추가작업 그리고 0개의 파일을 삭제
  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);