[Bf-blender-cvs] [a881f1da88a] workspaces: Workaround for crash using CTX_data_scene_layer
Campbell Barton
noreply at git.blender.org
Tue Apr 4 05:23:18 CEST 2017
Commit: a881f1da88ac6bf4ef69d903730e39ad631928ca
Author: Campbell Barton
Date: Tue Apr 4 13:23:11 2017 +1000
Branches: workspaces
https://developer.blender.org/rBa881f1da88ac6bf4ef69d903730e39ad631928ca
Workaround for crash using CTX_data_scene_layer
===================================================================
M source/blender/editors/util/ed_util.c
===================================================================
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 96864c88d9d..2fb1fd569ce 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -88,7 +88,12 @@ void ED_editors_init(bContext *C)
wmWindowManager *wm = CTX_wm_manager(C);
Main *bmain = CTX_data_main(C);
Scene *sce = CTX_data_scene(C);
+
+ /* workaround! we need winactive set here, not sure of better way */
+ wm->winactive = wm->windows.first;
SceneLayer *sl = CTX_data_scene_layer(C);
+ wm->winactive = NULL;
+
Object *ob, *obact = (sl && sl->basact) ? sl->basact->object : NULL;
ID *data;
More information about the Bf-blender-cvs
mailing list