Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-06-25 19:54:20 +0400
committerTon Roosendaal <ton@blender.org>2011-06-25 19:54:20 +0400
commit08cf05d8d593db9862b3b57a8c89464044730b26 (patch)
treee7c9ee63110c1ebd1014a5b746fa4bdcf20db952
parent418bce934129bacdee30a3cbffa47e7d299bd3ff (diff)
Bugfix #27765
Thumbnail save for .blend crashed, when being in editmode for a mesh that has other object users as well. Derivedmesh confusement... Thanks to Sergey for finding the cause!
-rw-r--r--source/blender/windowmanager/intern/wm_files.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 4693c8079d2..e0cfb86ce05 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -722,6 +722,10 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
}
}
+ /* blend file thumbnail */
+ /* save before exit_editmode, otherwise derivedmeshes for shared data corrupt #27765) */
+ ibuf_thumb= blend_file_thumb(CTX_data_scene(C), &thumb);
+
BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
/* operator now handles overwrite checks */
@@ -736,9 +740,6 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
/* don't forget not to return without! */
WM_cursor_wait(1);
- /* blend file thumbnail */
- ibuf_thumb= blend_file_thumb(CTX_data_scene(C), &thumb);
-
fileflags |= G_FILE_HISTORY; /* write file history */
if (BLO_write_file(CTX_data_main(C), filepath, fileflags, reports, thumb)) {