- Added missing null pointer check.

This commit is contained in:
drfrag 2021-07-17 22:03:25 +02:00 committed by Christoph Oelckers
parent 3f9a3a454b
commit d00c6e4ecc

View file

@ -1621,7 +1621,7 @@ const char *S_GetSoundClass(AActor *pp)
return Skins[player->userinfo.GetSkin()].Name.GetChars();
}
return player->SoundClass.IsEmpty() ? defaultsoundclass : player->SoundClass.GetChars();
return (!player || player->SoundClass.IsEmpty()) ? defaultsoundclass : player->SoundClass.GetChars();
}
//==========================================================================