Fix T48688: Crash loading particle effector weights

This commit is contained in:
Campbell Barton 2016-06-21 09:41:25 +10:00
parent 29ce3dfeb6
commit 1c19940198
Notes: blender-bot 2023-02-14 07:49:06 +01:00
Referenced by issue #48703, Naming inconsistency between Toggle Maximise/Fullscreen Area
Referenced by issue #48707, editmesh intersect (boolean) blender crash
Referenced by issue #48688, Crash during file open
1 changed files with 6 additions and 2 deletions

View File

@ -4054,9 +4054,13 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
lib_link_partdeflect(fd, &part->id, part->pd);
lib_link_partdeflect(fd, &part->id, part->pd2);
if (part->effector_weights)
if (part->effector_weights) {
part->effector_weights->group = newlibadr(fd, part->id.lib, part->effector_weights->group);
}
else {
part->effector_weights = BKE_add_effector_weights(part->eff_group);
}
if (part->dupliweights.first && part->dup_group) {
int index_ok = 0;
/* check for old files without indices (all indexes 0) */