HACK: Prevent a strange crash related to replay cameras.

This commit is contained in:
Fireboyd78 2020-08-24 03:01:45 -07:00
parent f4cf0d3f75
commit 475d19db93

View File

@ -1008,8 +1008,12 @@ void PlaceCameraInCar(_PLAYER *lp, int BumperCam)
}
else
{
viewer_position.vy = 7;
viewer_position.vz = cp->ap.carCos->colBox.vz - 80;
// [A] prevent crash from happening
if (cp->ap.carCos != NULL)
{
viewer_position.vy = 7;
viewer_position.vz = cp->ap.carCos->colBox.vz - 80;
}
}
if ((paddCamera & 3) == 3)