From fd6a71cac585feff3244403119afe1aff239b59a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 11 Apr 2021 20:37:04 +0200 Subject: [PATCH] - fixed a random crash with an empty sprite I just experienced. --- source/games/blood/src/actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index a3fcf58f5..1ffdd1d79 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -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)