mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixed possible NULL pointer deref in P_SpawnPlayerMissile().
SVN r4257 (trunk)
This commit is contained in:
parent
e935cf9e62
commit
e8d8e67b56
1 changed files with 5 additions and 1 deletions
|
@ -5634,7 +5634,11 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
|||
AActor *defaultobject = GetDefaultByType(type);
|
||||
int vrange = nofreeaim ? ANGLE_1*35 : 0;
|
||||
|
||||
if (source && source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM))
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
if (source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM))
|
||||
{
|
||||
// Keep exactly the same angle and pitch as the player's own aim
|
||||
an = angle;
|
||||
|
|
Loading…
Reference in a new issue