[Bf-blender-cvs] [0a34e5b3008] master: Fix crash accessing the tool with no active space
Campbell Barton
noreply at git.blender.org
Thu Mar 26 05:41:35 CET 2020
Commit: 0a34e5b30085b2ec3225669d27175287fc2aa436
Author: Campbell Barton
Date: Thu Mar 26 12:49:36 2020 +1100
Branches: master
https://developer.blender.org/rB0a34e5b30085b2ec3225669d27175287fc2aa436
Fix crash accessing the tool with no active space
===================================================================
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 4cfd1d1e0c0..551250ec747 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -73,7 +73,7 @@ struct bToolRef *WM_toolsystem_ref_from_context(struct bContext *C)
WorkSpace *workspace = CTX_wm_workspace(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
ScrArea *sa = CTX_wm_area(C);
- if (((1 << sa->spacetype) & WM_TOOLSYSTEM_SPACE_MASK) == 0) {
+ if ((sa == NULL) || ((1 << sa->spacetype) & WM_TOOLSYSTEM_SPACE_MASK) == 0) {
return NULL;
}
const bToolKey tkey = {
More information about the Bf-blender-cvs
mailing list