- add missing null pointer checks

This commit is contained in:
Christoph Oelckers 2022-09-24 12:26:18 +02:00
parent 6356aeafc2
commit 560bf3e8df

View file

@ -378,11 +378,11 @@ void powerupDeactivate(PLAYER* pPlayer, int nPowerUp)
break;
case kItemDivingSuit:
pPlayer->damageControl[4]--;
if (pPlayer->nPlayer == myconnectindex && VanillaMode() ? true : pPlayer->pwUpTime[24] == 0)
if (pPlayer && pPlayer->nPlayer == myconnectindex && VanillaMode() ? true : pPlayer->pwUpTime[24] == 0)
sfxSetReverb(0);
break;
case kItemReflectShots:
if (pPlayer->nPlayer == myconnectindex && VanillaMode() ? true : pPlayer->packSlots[1].isActive == 0)
if (pPlayer && pPlayer->nPlayer == myconnectindex && VanillaMode() ? true : pPlayer->packSlots[1].isActive == 0)
sfxSetReverb(0);
break;
case kItemGasMask: