From d4a2972a21d025481f70b7c1b5c66595eb57cfe1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Nov 2010 03:45:45 +0000 Subject: [PATCH] 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. --- source/blender/makesrna/intern/rna_main_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 018fc4b7777..71fe63c9e9c 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -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); }