missing null check, would crash blender when loading some files
This commit is contained in:
parent
48abe5a66e
commit
b7653ba542
@ -8116,11 +8116,13 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
/* check if top parent has compound shape set and if yes, set this object
|
||||
to compound shaper as well (was the behaviour before, now it's optional) */
|
||||
Object *parent= newlibadr(fd, lib, ob->parent);
|
||||
while (parent->parent != NULL) {
|
||||
parent = newlibadr(fd, lib, parent->parent);
|
||||
if(parent) {
|
||||
while (parent->parent != NULL) {
|
||||
parent = newlibadr(fd, lib, parent->parent);
|
||||
}
|
||||
if (parent->gameflag & OB_CHILD)
|
||||
ob->gameflag |= OB_CHILD;
|
||||
}
|
||||
if (parent->gameflag & OB_CHILD)
|
||||
ob->gameflag |= OB_CHILD;
|
||||
}
|
||||
}
|
||||
for(wrld=main->world.first; wrld; wrld= wrld->id.next) {
|
||||
|
Loading…
Reference in New Issue
Block a user