mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'demo-quit-crash-fix' into 'next'
Fix crash if you start recording a replay and immediately close the game See merge request STJr/SRB2!1082
This commit is contained in:
commit
8d60579e6c
1 changed files with 6 additions and 3 deletions
|
@ -2382,9 +2382,12 @@ static void WriteDemoChecksum(void)
|
|||
static void G_StopDemoRecording(void)
|
||||
{
|
||||
boolean saved = false;
|
||||
WRITEUINT8(demo_p, DEMOMARKER); // add the demo end marker
|
||||
WriteDemoChecksum();
|
||||
saved = FIL_WriteFile(va(pandf, srb2home, demoname), demobuffer, demo_p - demobuffer); // finally output the file.
|
||||
if (demo_p)
|
||||
{
|
||||
WRITEUINT8(demo_p, DEMOMARKER); // add the demo end marker
|
||||
WriteDemoChecksum();
|
||||
saved = FIL_WriteFile(va(pandf, srb2home, demoname), demobuffer, demo_p - demobuffer); // finally output the file.
|
||||
}
|
||||
free(demobuffer);
|
||||
demorecording = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue