Commit: dc2617130b2e1d7d2b9892fbd7c6e7b60caafb66
Author: Bastien Montagne
Date:   Wed Dec 17 10:20:56 2014 +0100
Branches: master
https://developer.blender.org/rBdc2617130b2e1d7d2b9892fbd7c6e7b60caafb66

Fix: Never write previews for undo steps.

This may eat quite q bit of mem in the end (though nothing critical),
and icons (material ones e.g.) often ended up out of sync after undo.

===================================================================

M       source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenloader/intern/writefile.c 
b/source/blender/blenloader/intern/writefile.c
index 3dc1fed..bf82a4f 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2057,7 +2057,8 @@ static void write_lattices(WriteData *wd, ListBase 
*idbase)
 
 static void write_previews(WriteData *wd, PreviewImage *prv)
 {
-       if (prv) {
+       /* Never write previews in undo steps! */
+       if (prv && !wd->current) {
                short w = prv->w[1];
                short h = prv->h[1];
                unsigned int *rect = prv->rect[1];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to