[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31731] trunk/blender/extern/bullet2/src/ BulletCollision/CollisionShapes/btConvexHullShape.cpp: Fix [#23569] Convex hull bounds crash Blender

Nathan Letwory nathan at letworyinteractive.com
Fri Sep 3 07:18:38 CEST 2010


Revision: 31731
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31731
Author:   jesterking
Date:     2010-09-03 07:18:36 +0200 (Fri, 03 Sep 2010)

Log Message:
-----------
Fix [#23569] Convex hull bounds crash Blender
Reported by dobz116

This appears to happen only on 64bit Windows. An issue for this part of code was
reported at http://code.google.com/p/bullet/issues/detail?id=204 and fixed at
http://code.google.com/p/bullet/source/detail?r=1650 . The code change also fixes
the crash we experience: merged changes.

Modified Paths:
--------------
    trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp

Modified: trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
===================================================================
--- trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp	2010-09-03 03:30:20 UTC (rev 31730)
+++ trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp	2010-09-03 05:18:36 UTC (rev 31731)
@@ -24,12 +24,13 @@
 	m_shapeType = CONVEX_HULL_SHAPE_PROXYTYPE;
 	m_unscaledPoints.resize(numPoints);
 
-	unsigned char* pointsBaseAddress = (unsigned char*)points;
+	unsigned char* pointsAddress = (unsigned char*)points;
 
 	for (int i=0;i<numPoints;i++)
 	{
-		btVector3* point = (btVector3*)(pointsBaseAddress + i*stride);
-		m_unscaledPoints[i] = point[0];
+		btScalar* point = (btScalar*)pointsAddress;
+		m_unscaledPoints[i] = btVector3(point[0], point[1], point[2]);
+		pointsAddress += stride;
 	}
 
 	recalcLocalAabb();





More information about the Bf-blender-cvs mailing list