mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 20:38:14 +00:00
Make sure output parameters are zeroed in the case of an error
This commit is contained in:
@@ -849,6 +849,7 @@ int SDL_CreateWindowAndRenderer(int width, int height, SDL_WindowFlags window_fl
|
||||
*renderer = SDL_CreateRenderer(*window, NULL, 0);
|
||||
if (!*renderer) {
|
||||
SDL_DestroyWindow(*window);
|
||||
*window = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user