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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-12-17 12:20:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2014-12-17 12:23:34 +0300
commitdc2617130b2e1d7d2b9892fbd7c6e7b60caafb66 (patch)
tree40509171c795d36d4923b57dcc384dc5801e8d59
parentb04d2f99f20f44163756ee1f2ed8c1032de357d7 (diff)
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.
-rw-r--r--source/blender/blenloader/intern/writefile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 3dc1fed46c8..bf82a4fa551 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];