Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-11-22 16:39:53 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2014-11-22 16:39:53 +0300
commit789eaa0f5bda185d78e25d4fd252054c9f39e955 (patch)
treec68e1cc98e4bb1c46209033b9ba3892bf2be87d4 /source
parentf425de9341753addf39b12aac9ba16c6cba4f7ee (diff)
Fix T42688: python crash: bpy.context.scene.update().
`ED_render_scene_update()` should ensure it does have some WM to work on...
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/render/render_update.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 6118db703b4..1320fedbfa7 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -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();