From 9df6d335e40159a151bb778340ed800029bef9d8 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 6 Jan 2007 09:35:16 +0000 Subject: [PATCH] Should fix molgrums 'ktpro' crash. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2453 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_mvd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/server/sv_mvd.c b/engine/server/sv_mvd.c index eb1a859ac..5e721a14a 100644 --- a/engine/server/sv_mvd.c +++ b/engine/server/sv_mvd.c @@ -535,13 +535,14 @@ void SV_MVD_RunPendingConnections(void) int DestCloseAllFlush(qboolean destroyfiles, qboolean mvdonly) { int numclosed = 0; - mvddest_t *d, **prev; + mvddest_t *d, **prev, *next; DestFlush(true); //make sure it's all written. prev = &demo.dest; d = demo.dest; while(d) { + next = d->nextdest; if (!mvdonly || d->desttype != DEST_STREAM) { *prev = d->nextdest; @@ -549,9 +550,9 @@ int DestCloseAllFlush(qboolean destroyfiles, qboolean mvdonly) numclosed++; } else - prev = &d; + prev = &d->nextdest; - d = (*prev)->nextdest; + d = next; } return numclosed;