- added null pointer checks to locked door sound checks in RR.

This originally accessed undefined memory when no sprite was involved.
Fixes #157
This commit is contained in:
Christoph Oelckers 2020-11-07 10:23:31 +01:00
parent 976675c816
commit 59c72c923e

View file

@ -2740,7 +2740,7 @@ void checksectors_r(int snum)
operatesectors(neartagsector, p->GetActor());
else
{
if (neartagsprite->spriteextra > 3)
if (neartagsprite && neartagsprite->spriteextra > 3)
S_PlayActorSound(99, pact);
else
S_PlayActorSound(419, pact);
@ -2761,7 +2761,7 @@ void checksectors_r(int snum)
operatesectors(p->GetActor()->s.sectnum, p->GetActor());
else
{
if (neartagsprite->spriteextra > 3)
if (neartagsprite && neartagsprite->spriteextra > 3)
S_PlayActorSound(99, pact);
else
S_PlayActorSound(419, pact);