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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-22 21:52:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-22 21:52:21 +0400
commit2eb1339e3f53d83f960bf5c07341d91a806bbcc3 (patch)
treeba9482d80ee470a95e4482b77afb6d0bd4c11486 /source/blender/blenloader/intern/readfile.c
parent799afc1aa4bff22a6aed21a1cfe7da9e55d18a10 (diff)
Corrected fix for #28722: Segfault when reading volumetric clouds example
Looks like with current implementation voxeldata should always be created for voxel textures. Remove recently added NULL check and allocate voxel data when linking a texture.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c736270533e..ecd3c9b5dad 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3009,6 +3009,9 @@ static void direct_link_texture(FileData *fd, Tex *tex)
if(tex->vd) {
tex->vd->dataset = NULL;
tex->vd->ok = 0;
+ } else {
+ if(tex->type == TEX_VOXELDATA)
+ tex->vd= MEM_callocN(sizeof(VoxelData), "direct_link_texture VoxelData");
}
tex->nodetree= newdataadr(fd, tex->nodetree);