Skip to content

Commit fde575f

Browse files
cryhammgerhardy
authored andcommitted
fix, check maniFold pointCount
1 parent e74e3a0 commit fde575f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/caveexpress/server/entities/Platform.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ void Platform::onPreSolve (b2Contact* contact, IEntity* entity, const b2Manifold
4949
return;
5050

5151
const b2Manifold *maniFold = contact->GetManifold();
52+
if (maniFold->pointCount <= 0)
53+
return;
5254
const float normalImpulse = maniFold->points[0].normalImpulse;
5355
const float absNormalImpulse = fabs(normalImpulse);
5456
if (absNormalImpulse < EPSILON)

0 commit comments

Comments
 (0)