- fixed NULL pointer access in SetAmmoCapacity.

This commit is contained in:
Christoph Oelckers 2016-04-11 20:42:43 +02:00
parent 77bfffaee0
commit 99ca649930

View file

@ -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;
}
}
}
}