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:
authorCampbell Barton <ideasman42@gmail.com>2008-03-12 13:20:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-03-12 13:20:45 +0300
commit4c6ff955ed21dd273c12e2c76b9edaf57508dac3 (patch)
tree5b2e9063b83b48ca79e06c363b9530edcd777997 /source/blender/blenloader
parent8b63333f8c14bc5c74a95c1dd58e7568d5510eaa (diff)
quick fix for null check that crashed blender when reading some files.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3c42cf3ae51..4567da932ee 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4384,7 +4384,9 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
/*link direct data of ID properties*/
if (id->properties) {
id->properties = newdataadr(fd, id->properties);
- IDP_DirectLinkProperty(id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ if (id->properties) { /* this case means the data was written incorrectly, it should not happen */
+ IDP_DirectLinkProperty(id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ }
}
oldnewmap_free_unused(fd->datamap);