bugfix [#24803] Export UV Layout in PNG (default) corrupts Blendfile

Removing a scene would set the active scene, assuming the scene removed was the current scene. This broke UV Export which used a temp background scene.
This commit is contained in:
Campbell Barton 2010-11-19 03:45:45 +00:00
parent c1664dd78e
commit d4a2972a21

@ -118,7 +118,8 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
return;
}
ED_screen_set_scene(C, newscene);
if(CTX_wm_screen(C)->scene == scene)
ED_screen_set_scene(C, newscene);
unlink_scene(bmain, scene, newscene);
}