Fix #33405: preview render getting stuck in a particular .blend file, ObjectKey
[blender.git] / intern / cycles / render / shader.cpp
index 17f7fbd43d656fa69c289c700782f3a71f26ed0b..b9b49bf29896f6a37cbbfe5ab6f7ea2599236652 100644 (file)
@@ -121,12 +121,12 @@ ShaderManager::~ShaderManager()
 {
 }
 
-ShaderManager *ShaderManager::create(Scene *scene)
+ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem)
 {
        ShaderManager *manager;
 
 #ifdef WITH_OSL
-       if(scene->params.shadingsystem == SceneParams::OSL)
+       if(shadingsystem == SceneParams::OSL)
                manager = new OSLShaderManager();
        else
 #endif