Fixed the p->player null check in destroyed-kart.cpp being a part of hasCustomHusk rather than being a part of pValid as it's supposed to be

This commit is contained in:
Jack 2024-09-09 16:19:17 +01:00
parent 2bdc014006
commit f3ed9f580e

View file

@ -316,8 +316,8 @@ struct Kart : Mobj
} }
Mobj* p = player(); Mobj* p = player();
bool pValid = Mobj::valid(p); bool pValid = Mobj::valid(p) && p->player;
bool hasCustomHusk = pValid && p->player && skins[p->player->skin].sprites[SPR2_DKRT].numframes; bool hasCustomHusk = pValid && skins[p->player->skin].sprites[SPR2_DKRT].numframes;
if(hasCustomHusk) if(hasCustomHusk)
{ {