[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20391] trunk/blender/source/blender/ blenloader/intern/readfile.c: quick fix still allowed for possible crash, check for valid newlibadr return value in the while loop.

Campbell Barton ideasman42 at gmail.com
Mon May 25 03:00:19 CEST 2009


Revision: 20391
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20391
Author:   campbellbarton
Date:     2009-05-25 03:00:17 +0200 (Mon, 25 May 2009)

Log Message:
-----------
quick fix still allowed for possible crash, check for valid newlibadr return value in the while loop.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2009-05-25 00:31:41 UTC (rev 20390)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2009-05-25 01:00:17 UTC (rev 20391)
@@ -8116,10 +8116,10 @@
 				/* 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;
 				}





More information about the Bf-blender-cvs mailing list