[Bf-blender-cvs] [789eaa0] master: Fix T42688: python crash: bpy.context.scene.update().

Bastien Montagne noreply at git.blender.org
Sat Nov 22 14:41:15 CET 2014


Commit: 789eaa0f5bda185d78e25d4fd252054c9f39e955
Author: Bastien Montagne
Date:   Sat Nov 22 14:39:53 2014 +0100
Branches: master
https://developer.blender.org/rB789eaa0f5bda185d78e25d4fd252054c9f39e955

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

`ED_render_scene_update()` should ensure it does have some WM to work on...

===================================================================

M	source/blender/editors/render/render_update.c

===================================================================

diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 6118db7..1320fed 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();




More information about the Bf-blender-cvs mailing list