Skip to content

Commit 58a55a9

Browse files
authored
Fixes a weird nulling call in playsound (#330)
fix potentially bad call
1 parent 1fde0be commit 58a55a9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

code/game/sound.dm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,10 @@ var/list/rummage_sound = list(\
380380
if(dist > maxdistance)
381381
if(!ishuman(M))
382382
continue
383-
else if(!M.stats.getPerk(PERK_EAR_OF_QUICKSILVER))
384-
continue
383+
else
384+
var/mob/living/carbon/human/humanlistener = M
385+
if(humanlistener.stats && !humanlistener.stats.getPerk(PERK_EAR_OF_QUICKSILVER))
386+
continue
385387
var/turf/T = get_turf(M)
386388

387389
if(T && (T.z == turf_source.z || zrange && abs(T.z - turf_source.z) <= zrange))

0 commit comments

Comments
 (0)