mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 02:38:27 +00:00
Make sure output parameters are zeroed in the case of an error
This commit is contained in:
parent
04f1901751
commit
ca61bf682a
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue