File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ int EngineDemoRecorder::GetTick() {
3737 return this ->GetRecordingTick (this ->s_ClientDemoRecorder ->ThisPtr ());
3838}
3939
40+ // Stop any running demo so the SAR checksum is written to the demo file
41+ ON_EVENT (SAR_UNLOAD) {
42+ if (engine->demorecorder ->isRecordingDemo ) {
43+ engine->demorecorder ->Stop ();
44+ }
45+ }
46+
4047std::string EngineDemoRecorder::GetDemoFilename () {
4148#ifdef _WIN32
4249# define PATH_SEP " \\ "
Original file line number Diff line number Diff line change @@ -212,12 +212,7 @@ void SAR::SearchPlugin() {
212212void SAR::Unload () {
213213 if (unloading) return ;
214214 unloading = true ;
215-
216- // Stop any running demo so the SAR checksum is written to the demo file
217- if (engine->demorecorder ->isRecordingDemo ) {
218- engine->demorecorder ->Stop ();
219- }
220-
215+
221216 curl_global_cleanup ();
222217 if (statsCounter) {
223218 statsCounter->RecordData (session->GetTick ());
You can’t perform that action at this time.
0 commit comments