From 8417315678298988aecbe6a619b339de4edb33da Mon Sep 17 00:00:00 2001 From: cosmosninja Date: Mon, 17 Mar 2008 04:43:01 +0000 Subject: [PATCH] Joerg's fix for the material's memory leak git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1656 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/material.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/material.cpp b/src/material.cpp index 01f362076..301bc11af 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -19,6 +19,7 @@ #include "file_manager.hpp" #include "material.hpp" +#include "string_utils.hpp" #define UCLAMP 1 #define VCLAMP 2 @@ -194,5 +195,8 @@ void Material::install(bool is_full_path) m_state -> setOpaque () ; m_state -> disable ( GL_BLEND ) ; } + + // now set the name to the basename, so that all tests work as expected + m_texname = StringUtils::basename(m_texname); }