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:
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 336276bdd40..74a4ddfd8f3 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -539,7 +539,6 @@ static void writestruct_at_address_nr(
WriteData *wd, int filecode, const int struct_nr, int nr, const void *adr, const void *data)
{
BHead bh;
- const short *sp;
BLI_assert(struct_nr > 0 && struct_nr < SDNA_TYPE_MAX);
@@ -553,9 +552,9 @@ static void writestruct_at_address_nr(
bh.nr = nr;
bh.SDNAnr = struct_nr;
- sp = wd->sdna->structs[bh.SDNAnr];
+ const SDNA_Struct *struct_info = wd->sdna->structs[bh.SDNAnr];
- bh.len = nr * wd->sdna->types_size[sp[0]];
+ bh.len = nr * wd->sdna->types_size[struct_info->type];
if (bh.len == 0) {
return;