- corrected the NUL checks in S_FindSkinnedSound.

This commit is contained in:
Christoph Oelckers 2021-06-04 07:57:05 +02:00
parent 7d1ce1c8cd
commit 8b5847d4a2

View file

@ -1636,10 +1636,10 @@ int S_FindSkinnedSound (AActor *actor, FSoundID refid)
const char *pclass;
int gender = 0;
if (actor != nullptr)
if (actor != nullptr && actor->player != nullptr)
{
if (actor->player != nullptr) pclass = S_GetSoundClass(actor);
if (actor->player != nullptr) gender = actor->player->userinfo.GetGender();
pclass = S_GetSoundClass(actor);
gender = actor->player->userinfo.GetGender();
}
else
{