Fixed a crash with A_JumpIfNoAmmo

Non-weapon layers can pass the caller check even when there is no ReadyWeapon
This commit is contained in:
Leonard2 2016-06-17 09:35:10 +02:00
parent 68c483c041
commit 24c73071f4

View file

@ -1740,7 +1740,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfNoAmmo)
PARAM_ACTION_PROLOGUE;
PARAM_STATE(jump);
if (!ACTION_CALL_FROM_PSPRITE())
if (!ACTION_CALL_FROM_PSPRITE() || self->player->ReadyWeapon == nullptr)
{
ACTION_RETURN_STATE(NULL);
}