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

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