mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 04:00:53 +00:00
- Blood: fixed crash with badly defined drop objects.
Got -1 for picnum there, this was causing crashes.
This commit is contained in:
parent
a15ac43722
commit
efe76a6647
1 changed files with 6 additions and 1 deletions
|
@ -2854,7 +2854,12 @@ spritetype *actDropObject(spritetype *pSprite, int nType) {
|
||||||
else if (nType >= kItemAmmoBase && nType < kItemAmmoMax) pSprite2 = actDropAmmo(pSprite, nType);
|
else if (nType >= kItemAmmoBase && nType < kItemAmmoMax) pSprite2 = actDropAmmo(pSprite, nType);
|
||||||
else if (nType >= kItemWeaponBase && nType < kItemWeaponMax) pSprite2 = actDropWeapon(pSprite, nType);
|
else if (nType >= kItemWeaponBase && nType < kItemWeaponMax) pSprite2 = actDropWeapon(pSprite, nType);
|
||||||
|
|
||||||
if (pSprite2 && pSprite->picnum > -1) {
|
if (pSprite2) {
|
||||||
|
if (pSprite2->picnum == -1)
|
||||||
|
{
|
||||||
|
DeleteSprite(pSprite2 - sprite);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
if (bottom >= pSprite2->z)
|
if (bottom >= pSprite2->z)
|
||||||
|
|
Loading…
Reference in a new issue