[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19501] trunk/blender/extern/bullet2/src/ BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp: [#17963] NearSensor segmentation fault
Campbell Barton
ideasman42 at gmail.com
Thu Apr 2 10:33:46 CEST 2009
Revision: 19501
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19501
Author: campbellbarton
Date: 2009-04-02 10:33:45 +0200 (Thu, 02 Apr 2009)
Log Message:
-----------
[#17963] NearSensor segmentation fault
bugfix in bullet
Caused by using the index from closestAxis4 before checking its -1
Modified Paths:
--------------
trunk/blender/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
Modified: trunk/blender/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
===================================================================
--- trunk/blender/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp 2009-04-02 06:59:27 UTC (rev 19500)
+++ trunk/blender/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp 2009-04-02 08:33:45 UTC (rev 19501)
@@ -172,6 +172,9 @@
#if MANIFOLD_CACHE_SIZE >= 4
//sort cache so best points come first, based on area
insertIndex = sortCachedPoints(newPoint);
+
+ if (insertIndex<0)
+ insertIndex=0;
#else
insertIndex = 0;
#endif
@@ -180,11 +183,7 @@
} else
{
m_cachedPoints++;
-
-
}
- if (insertIndex<0)
- insertIndex=0;
btAssert(m_pointCache[insertIndex].m_userPersistentData==0);
m_pointCache[insertIndex] = newPoint;
More information about the Bf-blender-cvs
mailing list