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:
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
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue