Fix a memory leak in the previous commit.

This commit is contained in:
Boldizsár Lipka 2014-03-30 19:32:05 +02:00
parent c63c27ae5e
commit e9d42a91ce

View file

@ -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);
}