mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 03:25:21 +00:00
Fix a memory leak in the previous commit.
This commit is contained in:
parent
c63c27ae5e
commit
e9d42a91ce
@ -51,6 +51,7 @@ ttexture::ttexture(SDL_Renderer& renderer,
|
||||
texture_ = SDL_CreateTextureFromSurface(&renderer, img);
|
||||
|
||||
if (texture_ == NULL) {
|
||||
SDL_FreeSurface(img);
|
||||
throw texception("Failed to create SDL_Texture object.", true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user