- added NULL pointer check to portal rotation calculation function.

This commit is contained in:
Christoph Oelckers 2016-03-12 22:37:43 +01:00
parent 0a92138edf
commit 8c027aef8b

View file

@ -244,6 +244,8 @@ static line_t *FindDestination(line_t *src, int tag)
//============================================================================
static void SetRotation(FLinePortal *port)
{
if (port != NULL && port->mDestination != NULL)
{
line_t *dst = port->mDestination;
line_t *line = port->mOrigin;
@ -252,6 +254,7 @@ static void SetRotation(FLinePortal *port)
port->mCosRot = FLOAT2FIXED(cos(angle));
port->mAngleDiff = RAD2ANGLE(angle);
}
}
//============================================================================
//