- fixed a random crash with an empty sprite I just experienced.

This commit is contained in:
Christoph Oelckers 2021-04-11 20:37:04 +02:00
parent 0ee28fb45e
commit fd6a71cac5

View file

@ -2854,7 +2854,7 @@ spritetype *actDropObject(spritetype *pSprite, int nType) {
else if (nType >= kItemAmmoBase && nType < kItemAmmoMax) pSprite2 = actDropAmmo(pSprite, nType);
else if (nType >= kItemWeaponBase && nType < kItemWeaponMax) pSprite2 = actDropWeapon(pSprite, nType);
if (pSprite2) {
if (pSprite2 && pSprite->picnum > -1) {
int top, bottom;
GetSpriteExtents(pSprite2, &top, &bottom);
if (bottom >= pSprite2->z)