From c24415fbac8ae97ade7a7893fa4553a877e6533a Mon Sep 17 00:00:00 2001 From: mathnerd314 Date: Wed, 20 Jan 2010 23:35:46 +0000 Subject: [PATCH] Octo's patch from bug 523. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6266 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/video/texture_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/texture_manager.cpp b/src/video/texture_manager.cpp index e49423bf2..83313f38a 100644 --- a/src/video/texture_manager.cpp +++ b/src/video/texture_manager.cpp @@ -67,7 +67,7 @@ TextureManager::get(const std::string& _filename) if(!texture) { texture = create_image_texture(filename); - image_textures[filename] = texture; + image_textures[texture->get_filename()] = texture; } return texture; @@ -111,6 +111,7 @@ TextureManager::create_image_texture(const std::string& filename, const Rect& re { log_warning << "Couldn't load texture '" << filename << "' (now using dummy texture): " << err.what() << std::endl; TexturePtr texture = create_dummy_texture(); + texture->set_filename(filename); return texture; } } @@ -167,6 +168,7 @@ TextureManager::create_image_texture(const std::string& filename) { log_warning << "Couldn't load texture '" << filename << "' (now using dummy texture): " << err.what() << std::endl; TexturePtr texture = create_dummy_texture(); + texture->set_filename(filename); return texture; } } -- 2.11.0