Commit 9120aebe authored by cutealien's avatar cutealien

Add early-out in collision for empty selectors.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3893 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 875abd25
...@@ -358,6 +358,9 @@ bool CSceneCollisionManager::getCollisionPoint(const core::line3d<f32>& ray, ...@@ -358,6 +358,9 @@ bool CSceneCollisionManager::getCollisionPoint(const core::line3d<f32>& ray,
} }
s32 totalcnt = selector->getTriangleCount(); s32 totalcnt = selector->getTriangleCount();
if ( totalcnt <= 0 )
return false;
Triangles.set_used(totalcnt); Triangles.set_used(totalcnt);
s32 cnt = 0; s32 cnt = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment