- fixed some crash issues with recent changes.

This commit is contained in:
Christoph Oelckers 2016-06-18 10:01:24 +02:00
commit 87d27b8db3
2 changed files with 6 additions and 2 deletions

View file

@ -1077,8 +1077,12 @@ void gl_RenderHUDModel(DPSprite *psp, float ofsX, float ofsY)
bool gl_IsHUDModelForPlayerAvailable (player_t * player)
{
if (player == nullptr || player->ReadyWeapon == nullptr)
return false;
DPSprite *psp = player->FindPSprite(PSP_WEAPON);
if ( (player == nullptr) || (player->ReadyWeapon == nullptr) || (psp->GetState() == nullptr) )
if (psp == nullptr || psp->GetState() == nullptr)
return false;
FState* state = psp->GetState();