[Bf-blender-cvs] [03f1b94e023] blender2.8: Fix crash changing settings of operator executed in different scene

Julian Eisel noreply at git.blender.org
Tue Oct 24 18:25:23 CEST 2017


Commit: 03f1b94e0238899757579ade582e2e69ad4e0a01
Author: Julian Eisel
Date:   Tue Oct 24 18:22:42 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB03f1b94e0238899757579ade582e2e69ad4e0a01

Fix crash changing settings of operator executed in different scene

Steps to reproduce were:
* Open Blender, create a new scene
* Go back to initial scene, transform object
* Switch back to newly created scene, change operator settings there
* Should cause a crash (at least with asan)

Should behave like 2.7 now, that is, switch scene back to where
operator was executed.

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

M	source/blender/blenkernel/intern/blendfile.c

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

diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index e1350aa8a46..211f92c2e78 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -216,6 +216,7 @@ static void setup_app_data(
 			wmWindowManager *wm = bfd->main->wm.first;
 			if (wm_scene_is_visible(wm, bfd->curscene) == false) {
 				curscene = bfd->curscene;
+				win->scene = curscene;
 				BKE_screen_view3d_scene_sync(curscreen, curscene);
 			}
 		}



More information about the Bf-blender-cvs mailing list