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>2015-07-22 12:54:53 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-07-22 12:58:18 +0300
commit945f32e66d6ada2a05b7700a197209b9c66b4682 (patch)
treecebfc19abb92eb4afa9f3569fe00de2490f5631e /source/blender/blenkernel/intern/customdata.c
parentcf6002737da7a842650d47569385467f4812cb78 (diff)
Fix crash with recent refactor of customdata writing.
Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers needed to store saved customdata, we have to adjust CustomData->maxlayer too. Otherwise, on next read, customdata code believes it has more layers allocated than actual number. Issue reported by Campbell over IRC, thanks.
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index abfe746a7f3..b1740d4c525 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -3251,6 +3251,7 @@ void CustomData_file_write_prepare(
}
}
BLI_assert(j == data->totlayer);
+ data->maxlayer = data->totlayer; /* We only write that much of data! */
*r_write_layers = write_layers;
}