summaryrefslogtreecommitdiffstats
path: root/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp')
-rw-r--r--src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp b/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
index 5f54b4c..cb94534 100644
--- a/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
+++ b/src/runtimerender/Qt3DSRenderCustomMaterialSystem.cpp
@@ -1266,6 +1266,9 @@ struct SMaterialSystem : public ICustomMaterialSystem
if (theProgram) {
theInsertResult.first->second =
QT3DS_NEW(m_Allocator, SCustomMaterialShader)(*theProgram, theFlags);
+ } else {
+ // If a changed shader fails to compile, clean away the old result from cache
+ theInsertResult.first->second = NULL;
}
} else if (theInsertResult.first->second)
theProgram = theInsertResult.first->second->m_Shader;