ref: a1b2ce54d02823aa85c7df6aa016c567185451ae
parent: 8f00200a9795697a7a432ab93ff059281c6ed87d
author: Simon Howard <[email protected]>
date: Fri Sep 7 16:57:24 EDT 2012
Fix crash when updating sounds with a NULL listener. Subversion-branch: /branches/v2-branch Subversion-revision: 2520
--- a/src/heretic/s_sound.c
+++ b/src/heretic/s_sound.c
@@ -479,7 +479,7 @@
}
}
if (channel[i].mo == NULL || channel[i].sound_id == 0
- || channel[i].mo == listener)
+ || channel[i].mo == listener || listener == NULL)
{
continue;
}
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -669,7 +669,7 @@
Channel[i].sound_id = 0;
}
if (Channel[i].mo == NULL || Channel[i].sound_id == 0
- || Channel[i].mo == listener)
+ || Channel[i].mo == listener || listener == NULL)
{
continue;
}