From ada4e375564d72d2bf739ee0b46622fe590fbff6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 24 Nov 2014 01:02:18 +0100 Subject: [PATCH] Fix race preview texture not being destroyed properly (Fixes #2098) --- apps/openmw/mwgui/race.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/race.cpp b/apps/openmw/mwgui/race.cpp index 2bfc4f1416..444b572b68 100644 --- a/apps/openmw/mwgui/race.cpp +++ b/apps/openmw/mwgui/race.cpp @@ -162,6 +162,9 @@ namespace MWGui void RaceDialog::close() { + mPreviewImage->setImageTexture(""); + const std::string textureName = "CharacterHeadPreview"; + MyGUI::RenderManager::getInstance().destroyTexture(MyGUI::RenderManager::getInstance().getTexture(textureName)); mPreview.reset(NULL); }