mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- added NULL pointer check to portal rotation calculation function.
This commit is contained in:
parent
0a92138edf
commit
8c027aef8b
1 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue