diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 68b48042a..de05edbb8 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -1438,6 +1438,14 @@ video::ITexture *IrrDriver::getTexture(const std::string &filename, return out; } // getTexture +// ---------------------------------------------------------------------------- +/** Clear the texture-filename reminder. +*/ +void IrrDriver::clearTexturesFileName() +{ + m_texturesFileName.clear(); +} // clearTexturesFileName + // ---------------------------------------------------------------------------- /** Get the texture file name using a texture pointer. * \param tex Pointer on the texture for which we want to find the file name. diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index df7f21b66..79d1b0887 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -309,6 +309,7 @@ public: bool is_premul=false, bool is_prediv=false, bool complain_if_not_found=true); + void clearTexturesFileName(); std::string getTextureName(video::ITexture* tex); void grabAllTextures(const scene::IMesh *mesh); void dropAllTextures(const scene::IMesh *mesh); diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index e7795ee1a..2010adb30 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -207,8 +207,10 @@ void Track::cleanup() ItemManager::destroy(); ParticleKindManager::get()->cleanUpTrackSpecificGfx(); - // Clear remainder of transformed textures + // Clear reminder of transformed textures resetTextureTable(); + // Clear reminder of the link between textures and file names. + irr_driver->clearTexturesFileName(); for(unsigned int i=0; i