diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shader.cpp | 6 | ||||
-rw-r--r-- | src/shader.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/shader.cpp b/src/shader.cpp index a224c82bb..62b7c99a9 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -388,6 +388,12 @@ ShaderSource::ShaderSource(IrrlichtDevice *device): ShaderSource::~ShaderSource() { //m_shader_callback->drop(); + + for (std::vector<IShaderConstantSetter*>::iterator iter = m_global_setters.begin(); + iter != m_global_setters.end(); iter++) { + delete *iter; + } + m_global_setters.clear(); } u32 ShaderSource::getShaderId(const std::string &name) diff --git a/src/shader.h b/src/shader.h index a7367eaff..a62569602 100644 --- a/src/shader.h +++ b/src/shader.h @@ -49,6 +49,7 @@ struct ShaderInfo video::E_MATERIAL_TYPE material; ShaderInfo(): name(""), material(video::EMT_SOLID) {} + virtual ~ShaderInfo() {} }; /* |