Fix #32972: cycles crash changing to GPU render with OSL enabled.

This commit is contained in:
Brecht Van Lommel 2012-11-09 21:27:05 +00:00
parent dcca228906
commit 3f0fe65635
2 changed files with 6 additions and 0 deletions

@ -284,6 +284,8 @@ static PyObject *osl_update_node_func(PyObject *self, PyObject *args)
if(param->validdefault)
default_string = param->sdefault[0];
}
else
continue;
}
else
continue;

@ -44,6 +44,10 @@ Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_)
device = NULL;
memset(&dscene.data, 0, sizeof(dscene.data));
/* OSL only works on the CPU */
if(device_info_.type != DEVICE_CPU)
params.shadingsystem = SceneParams::SVM;
camera = new Camera();
filter = new Filter();
film = new Film();