diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 318e162b5f1..5411657976e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6032,7 +6032,7 @@ static void direct_link_lightcache_texture(BlendDataReader *reader, LightCacheTe if (lctex->data) { BLO_read_data_address(reader, &lctex->data); - if (BLO_read_requires_endian_switch(reader)) { + if (lctex->data && BLO_read_requires_endian_switch(reader)) { int data_size = lctex->components * lctex->tex_size[0] * lctex->tex_size[1] * lctex->tex_size[2]; @@ -6044,6 +6044,10 @@ static void direct_link_lightcache_texture(BlendDataReader *reader, LightCacheTe } } } + + if (lctex->data == NULL) { + zero_v3_int(lctex->tex_size); + } } static void direct_link_lightcache(BlendDataReader *reader, LightCache *cache) |