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:
authorJanne Karhu <jhkarh@gmail.com>2011-07-31 20:26:02 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-07-31 20:26:02 +0400
commit5c8344bcc9f8f2c319346420766d9e4110beb607 (patch)
treeadf8aa2ab2fa231123bfbc35e2fb0243a70a47fc
parent2620bd0ade3451ee3dc3df7da6166335d46393d2 (diff)
Bug fix: loading a file that had particles using a dupligroup from a liblinked file without the library file being present crashed
-rw-r--r--source/blender/blenloader/intern/readfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4ad99c02b2d..0633794c6ed 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3162,7 +3162,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
if(part->effector_weights)
part->effector_weights->group = newlibadr(fd, part->id.lib, part->effector_weights->group);
- if(part->dupliweights.first) {
+ if(part->dupliweights.first && part->dup_group) {
int index_ok = 0;
/* check for old files without indices (all indexes 0) */
dw = part->dupliweights.first;
@@ -3193,6 +3193,9 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
dw->ob = newlibadr(fd, part->id.lib, dw->ob);
}
}
+ else {
+ part->dupliweights.first = part->dupliweights.last = NULL;
+ }
if(part->boids) {
BoidState *state = part->boids->states.first;