1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Ensure to destroy the main texture on reload

This commit is contained in:
Mathieu Schroeter 2018-06-14 23:51:22 +02:00
parent 17e9f1e3e4
commit c2b4bee30f

View File

@ -238,6 +238,12 @@ CPixmap::BltFast (
bool
CPixmap::ReloadTargetTextures ()
{
if (this->mainTexture)
{
SDL_DestroyTexture (this->mainTexture);
this->mainTexture = nullptr;
}
for (auto & tex : m_SDLTextureInfo)
{
if (!tex.second.target)