Do a full cleanup if renderer creation fails during autodetection
This commit is contained in:
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user