mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed NULL pointer access in SetAmmoCapacity.
This commit is contained in:
parent
77bfffaee0
commit
99ca649930
1 changed files with 5 additions and 2 deletions
|
@ -8637,8 +8637,11 @@ scriptwait:
|
|||
else
|
||||
{
|
||||
item = activator->GiveInventoryType (static_cast<PClassAmmo *>(type));
|
||||
item->MaxAmount = STACK(1);
|
||||
item->Amount = 0;
|
||||
if (item != NULL)
|
||||
{
|
||||
item->MaxAmount = STACK(1);
|
||||
item->Amount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue