0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-04-22 09:31:40 +00:00

Fix some bad timing with a dstring_delete.

Opps :P, double free.
This commit is contained in:
Bill Currie 2011-08-28 12:54:50 +09:00
parent 12e238f806
commit 9ace9f2bfa
2 changed files with 3 additions and 2 deletions
nq/source
qw/source

View file

@ -347,10 +347,10 @@ CL_StartDemo (void)
Sys_Printf ("Playing demo from %s.\n", name->str);
QFS_FOpenFile (name->str, &cls.demofile);
dstring_delete (name);
if (!cls.demofile) {
Sys_Printf ("ERROR: couldn't open.\n");
cls.demonum = -1; // stop demo loop
dstring_delete (name);
return;
}
@ -368,6 +368,7 @@ CL_StartDemo (void)
if (neg)
cls.forcetrack = -cls.forcetrack;
dstring_delete (name);
}
/*

View file

@ -890,10 +890,10 @@ CL_StartDemo (void)
Sys_Printf ("Playing demo from %s.\n", name->str);
QFS_FOpenFile (name->str, &cls.demofile);
dstring_delete (name);
if (!cls.demofile) {
Sys_Printf ("ERROR: couldn't open.\n");
cls.demonum = -1; // stop demo loop
dstring_delete (name);
return;
}