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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-05 16:18:07 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-05 16:18:07 +0400
commitcd19fd6c28bb976fd1ea7448fcde45fc217e004a (patch)
tree9b5e02b275b5ebdfb0fc20bf1349566dc0d0591a /source/blender/windowmanager
parent456a20ea07258baa01bec53fcb0f8eba59285a33 (diff)
Fix related to #32734: crash saving blend file from render_pre callback. Not
sure I want to recommend anyone doing this, but the fix is simple.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index eb6fabd03c6..7b78dbedb31 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -56,6 +56,7 @@
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
+#include "BLI_threads.h"
#include "BLI_callbacks.h"
#include "BLF_translation.h"
@@ -794,7 +795,7 @@ int WM_file_write(bContext *C, const char *target, int fileflags, ReportList *re
/* blend file thumbnail */
/* save before exit_editmode, otherwise derivedmeshes for shared data corrupt #27765) */
- if (U.flag & USER_SAVE_PREVIEWS) {
+ if ((U.flag & USER_SAVE_PREVIEWS) && BLI_thread_is_main()) {
ibuf_thumb = blend_file_thumb(CTX_data_scene(C), CTX_wm_screen(C), &thumb);
}