mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Fixed memory leak if requested renderer isn't available
This commit is contained in:
@@ -1089,6 +1089,8 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)
|
||||
if (rc) {
|
||||
break;
|
||||
}
|
||||
SDL_DestroyRendererWithoutFreeing(renderer);
|
||||
SDL_zerop(renderer); // make sure we don't leave function pointers from a previous CreateRenderer() in this struct.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user