mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-12-11 12:43:31 +08:00
Make sure we're not trying to add temporary memory twice
This commit is contained in:
parent
71a60d4c0e
commit
bebde1c4c9
@ -268,6 +268,9 @@ void *SDL_FreeLater(void *memory)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Make sure we're not adding this to the list twice
|
||||
SDL_assert(!SDL_ClaimTemporaryMemory(memory));
|
||||
|
||||
state = SDL_GetTemporaryMemoryState(SDL_TRUE);
|
||||
if (!state) {
|
||||
return memory; // this is now a leak, but you probably have bigger problems if malloc failed.
|
||||
|
Loading…
Reference in New Issue
Block a user