summaryrefslogtreecommitdiff
path: root/src/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader.cpp')
-rw-r--r--src/shader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shader.cpp b/src/shader.cpp
index f855a7fe3..ef15f29ba 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -383,13 +383,16 @@ 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();
+
+ if (m_shader_callback) {
+ m_shader_callback->drop();
+ m_shader_callback = NULL;
+ }
}
u32 ShaderSource::getShader(const std::string &name,