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:
authorMartin Poirier <theeth@yahoo.com>2008-10-28 21:47:01 +0300
committerMartin Poirier <theeth@yahoo.com>2008-10-28 21:47:01 +0300
commit025e4b046a527cdb58bccbccdec2f26d3973336c (patch)
treedbd3d6b68c75fa332a39f1eec628e044ece84d16 /source/blender/blenloader
parentd1e90606c799d75fd3782a225b1f154918fc0fe7 (diff)
parent705a248c75467ef67eba1cda124fd5375eb4666f (diff)
merge 17122:17206
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index ec26683444e..3a9d0a6ae6a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4921,6 +4921,12 @@ static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
ma= newlibadr(fd, lib, me->mat[mf->mat_nr]);
texalpha = 0;
+ /* we can't read from this if it comes from a library,
+ * because direct_link might not have happened on it,
+ * so ma->mtex is not pointing to valid memory yet */
+ if(ma && ma->id.lib)
+ ma= NULL;
+
for(b=0; ma && b<MAX_MTEX; b++)
if(ma->mtex && ma->mtex[b] && ma->mtex[b]->mapto & MAP_ALPHA)
texalpha = 1;