From f3d57a518d6eb6453de292e76bafd014818bd480 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 26 Apr 2015 23:07:21 -0400 Subject: 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. --- src/doom/s_sound.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3