mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
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:
parent
aa4299426e
commit
9df6d335e4
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue