diff --git a/source/glest_game/facilities/logger.cpp b/source/glest_game/facilities/logger.cpp index 73fe10e9..8300a87c 100644 --- a/source/glest_game/facilities/logger.cpp +++ b/source/glest_game/facilities/logger.cpp @@ -46,7 +46,10 @@ Logger::~Logger(){ void Logger::cleanupLoadingTexture() { if(loadingTexture!=NULL) { - delete loadingTexture; + Renderer &renderer= Renderer::getInstance(); + Texture *genericTexture = loadingTexture; + renderer.endTexture(rsGlobal,&genericTexture); + //delete loadingTexture; loadingTexture=NULL; } }