Corregido un "memory leak" en texture.cpp

This commit is contained in:
2022-12-01 10:43:58 +01:00
parent 5d89a3057e
commit 06ecabc676

View File

@@ -103,6 +103,7 @@ bool Texture::loadFromFile(std::string path, SDL_Renderer *renderer, bool verbos
} }
// Return success // Return success
stbi_image_free(data);
texture = newTexture; texture = newTexture;
return texture != nullptr; return texture != nullptr;
} }