mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 02:08:27 +00:00
Do a full cleanup if renderer creation fails during autodetection
This commit is contained in:
parent
ebd059e6eb
commit
95dd8781ce
10 changed files with 5 additions and 26 deletions
|
@ -1029,6 +1029,7 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)
|
|||
if (rc == 0) {
|
||||
break; // Yay, we got one!
|
||||
}
|
||||
SDL_DestroyRendererWithoutFreeing(renderer);
|
||||
SDL_zerop(renderer); // make sure we don't leave function pointers from a previous CreateRenderer() in this struct.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue