Skip to content

Commit

Permalink
[TextureAtlas] Now freeing texture properly before recreating the atlas.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Oct 29, 2023
1 parent 0bb3b1f commit 4dd3e1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/client/graphics/TextureAtlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ void TextureAtlas::packTextures() {
if (IMG_SavePNG(atlas.get(), "test_atlas.png") < 0)
throw EXCEPTION("Failed to save texture to: test_atlas.png. Reason:", IMG_GetError());

m_texture.free();
m_texture.loadFromSurface(atlas.get());

#ifdef OM_NOT_IMPLEMENTED_GL_TEXTURE
Expand Down

0 comments on commit 4dd3e1d

Please sign in to comment.