Fix T42688: python crash: bpy.context.scene.update().

`ED_render_scene_update()` should ensure it does have some WM to work on...
This commit is contained in:
Bastien Montagne 2014-11-22 14:39:53 +01:00
parent f425de9341
commit 789eaa0f5b
Notes: blender-bot 2023-02-14 10:29:32 +01:00
Referenced by issue #42688, python crash: bpy.context.scene.update()
Referenced by issue #42689, GPU rendering won't render two point lamps at once
1 changed files with 6 additions and 1 deletions

View File

@ -41,6 +41,7 @@
#include "DNA_world_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_listbase.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
@ -85,7 +86,11 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
/* don't call this recursively for frame updates */
if (recursive_check)
return;
/* Do not call if no WM available, see T42688. */
if (BLI_listbase_is_empty(&bmain->wm))
return;
recursive_check = true;
C = CTX_create();