thcmedia / papervision3d

Automatically exported from code.google.com/p/papervision3d
0 stars 0 forks source link

faulty numChildren #124

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
removing an object that's not actually added will result in a faulty
numChildren

What steps will reproduce the problem?

for (var i:uint=0; i<10; i++) {
    scene.removeChild(new DisplayObject());
}
trace(scene.numChildren);

What is the expected output? What do you see instead?
Expected output is 0 since no do3d's were added nor removed, however
numChildren results in -10.

Fix:
DisplayObjectContainer3D
line 103: removeChild( child:DisplayObject3D )
replace   if(child){   with   if(child && _children[child]){

Original issue reported on code.google.com by mailingl...@gmail.com on 10 Nov 2008 at 12:24

GoogleCodeExporter commented 8 years ago
Thank you for reporting. Fixed.

Original comment by r.hauw...@gmail.com on 17 Nov 2008 at 12:30