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.
This commit is contained in:
Julian Eisel
2017-10-24 18:22:42 +02:00
parent 3936ba9725
commit 03f1b94e02

View File

@@ -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);
}
}