Should fix molgrums 'ktpro' crash.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2453 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-01-06 09:35:16 +00:00
parent aa4299426e
commit 9df6d335e4

View file

@ -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;