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:
-rw-r--r--source/blender/blenlib/intern/bpath.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index 1c5aab7659d..654ade8955f 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -244,7 +244,7 @@ static struct Tex *tex_stepdata__internal(struct Tex *tex, const int step_next,
tex= tex->id.next;
while (tex) {
- if (tex->type == TEX_VOXELDATA && tex->vd && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format))
+ if (tex->type == TEX_VOXELDATA && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format))
break;
/* image is not a image with a path, skip it */
tex= tex->id.next;
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);