diff options
author | Simon Howard | 2015-04-26 23:07:21 -0400 |
---|---|---|
committer | Simon Howard | 2015-04-26 23:07:21 -0400 |
commit | f3d57a518d6eb6453de292e76bafd014818bd480 (patch) | |
tree | ef23898c56f261860c206d9f2af9954749f5ef6d /src | |
parent | 31c0b0c7e1e9340145e11866c74e20ceddae77f9 (diff) | |
download | chocolate-doom-f3d57a518d6eb6453de292e76bafd014818bd480.tar.gz chocolate-doom-f3d57a518d6eb6453de292e76bafd014818bd480.tar.bz2 chocolate-doom-f3d57a518d6eb6453de292e76bafd014818bd480.zip |
doom: Clear origin pointer when stopping sound.
When an mobj_t is freed, any currently-playing sounds attached to that
object are stopped, but the sound code was leaving a dangling pointer
to the freed mobj_t that was flagged by the -zonescan checks.
Diffstat (limited to 'src')
-rw-r--r-- | src/doom/s_sound.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doom/s_sound.c b/src/doom/s_sound.c index f6d8be13..5834650d 100644 --- a/src/doom/s_sound.c +++ b/src/doom/s_sound.c @@ -174,11 +174,12 @@ static void S_StopChannel(int cnum) break; } } - + // degrade usefulness of sound data c->sfxinfo->usefulness--; c->sfxinfo = NULL; + c->origin = NULL; } } |