Fix #33114: crash with render frame update script and GLSL.

This commit is contained in:
Brecht Van Lommel
2012-11-07 16:27:18 +00:00
parent 043efbc464
commit b27a6c6b0d

View File

@@ -378,6 +378,12 @@ static void scene_changed(Main *bmain, Scene *UNUSED(scene))
void ED_render_id_flush_update(Main *bmain, ID *id)
{
/* this can be called from render or baking thread when a python script makes
* changes, in that case we don't want to do any editor updates, and making
* GPU changes is not possible because OpenGL only works in the main thread */
if (!BLI_thread_is_main())
return;
switch (GS(id->name)) {
case ID_MA:
material_changed(bmain, (Material *)id);