[Bf-blender-cvs] [3d6b912] input_method_editor: Fix T42688: python crash: bpy.context.scene.update().

Bastien Montagne noreply at git.blender.org
Mon Nov 24 00:45:33 CET 2014


Commit: 3d6b91229370e3e25964a41125ea93a4c68e0fed
Author: Bastien Montagne
Date:   Sat Nov 22 14:39:53 2014 +0100
Branches: input_method_editor
https://developer.blender.org/rB3d6b91229370e3e25964a41125ea93a4c68e0fed

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