Fix bug using opponent's pit without checking it to be defined

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2302 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ba15b475516cd3e441035510e620f73ef229c104
Former-commit-id: 1106cac96b641cdc1cdaceb4370d0b6e8ac61d9a
This commit is contained in:
wdbee 2010-03-23 17:09:49 +00:00
parent 2dccc1720a
commit f4aae21bab

View file

@ -3072,6 +3072,8 @@ void Driver::update(tSituation *s)
break;
}
if (opponent[i].getCarPtr()->_pit != NULL)
{
if (opponent[i].getCarPtr()->_pit->pos.seg == car->_pit->pos.seg)
{
// sharing a pit
@ -3098,7 +3100,7 @@ void Driver::update(tSituation *s)
pitpos = PIT_FRONT; // stop at end of pit space to leave room
}
}
}
break;
}
}