Fixed crash (assertion failure in btAcos).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3336 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-04-01 00:44:47 +00:00
parent 4ccd7662ef
commit 0681523762

View File

@ -95,7 +95,7 @@ void Bowling::update(float dt)
btVector3 direction;
float minDistance;
getClosestKart(&kart, &minDistance, &direction);
if(minDistance<m_st_max_distance_squared) // move bowling towards kart
if(kart && minDistance<m_st_max_distance_squared) // move bowling towards kart
{
// limit angle, so that the bowling ball does not turn
// around to hit a kart behind