[Bf-blender-cvs] [009bfbf408c] blender2.8: Fix crash when switching to Scripting workspace

Dalai Felinto noreply at git.blender.org
Fri Oct 26 20:33:57 CEST 2018


Commit: 009bfbf408c7ceec60639e279e28d14c726dcc81
Author: Dalai Felinto
Date:   Fri Oct 26 15:33:03 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB009bfbf408c7ceec60639e279e28d14c726dcc81

Fix crash when switching to Scripting workspace

Crash introduced on: a4a6ed1ba3c86ed842f4373c65d64d28d827f864.

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

M	source/blender/windowmanager/intern/wm_toolsystem.c

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

diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index c5882ed9c21..04548ef1315 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -338,6 +338,10 @@ void WM_toolsystem_reinit_all(struct bContext *C, wmWindow *win)
 	bScreen *screen = WM_window_get_active_screen(win);
 	ViewLayer *view_layer = WM_window_get_active_view_layer(win);
 	for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+		if (((1 << sa->spacetype) & WM_TOOLSYSTEM_SPACE_MASK) == 0) {
+			continue;
+		}
+
 		WorkSpace *workspace = WM_window_get_active_workspace(win);
 		const bToolKey tkey = {
 			.space_type = sa->spacetype,



More information about the Bf-blender-cvs mailing list