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>2009-05-25 05:00:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-25 05:00:17 +0400
commit1266e0f2bffb95a59157075f9f4f071dcc744f73 (patch)
treecc8ee3a6200c793953af0dcdeccf24522d1b85c0 /source/blender/blenloader
parentb7653ba5421a245957ac6170f0bbca0589220bae (diff)
quick fix still allowed for possible crash, check for valid newlibadr return value in the while loop.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3284f8efdf2..abfb8ebd04c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8116,10 +8116,10 @@ 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->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;
}