summaryrefslogtreecommitdiff
path: root/src/heretic/s_sound.c
diff options
context:
space:
mode:
authorSimon Howard2012-09-07 20:57:24 +0000
committerSimon Howard2012-09-07 20:57:24 +0000
commita1b2ce54d02823aa85c7df6aa016c567185451ae (patch)
tree5c9d0f8931164c9f84c2f601fd77fd28fba0e7a2 /src/heretic/s_sound.c
parent8f00200a9795697a7a432ab93ff059281c6ed87d (diff)
downloadchocolate-doom-a1b2ce54d02823aa85c7df6aa016c567185451ae.tar.gz
chocolate-doom-a1b2ce54d02823aa85c7df6aa016c567185451ae.tar.bz2
chocolate-doom-a1b2ce54d02823aa85c7df6aa016c567185451ae.zip
Fix crash when updating sounds with a NULL listener.
Subversion-branch: /branches/v2-branch Subversion-revision: 2520
Diffstat (limited to 'src/heretic/s_sound.c')
-rw-r--r--src/heretic/s_sound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c
index 73942201..e94f17a5 100644
--- a/src/heretic/s_sound.c
+++ b/src/heretic/s_sound.c
@@ -479,7 +479,7 @@ void S_UpdateSounds(mobj_t * listener)
}
}
if (channel[i].mo == NULL || channel[i].sound_id == 0
- || channel[i].mo == listener)
+ || channel[i].mo == listener || listener == NULL)
{
continue;
}