1
0
Fork 0

Fix: NewGRF Profile didn't stop if there were no events yet (#10816)

This meant you could have the following situation:
- You start a profile on a GRF with no events, for N days.
- The days pass, the profile should stop. It doesn't.
- The profile will never stop, even if the GRF start generating events.
- There is no real way to discover this, so .. byebye memory? :)
pull/10817/head
Patric Stout 2023-05-13 18:23:23 +02:00 committed by GitHub
parent 531d1ae8bc
commit d54660184a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -98,6 +98,8 @@ uint32 NewGRFProfiler::Finish()
if (this->calls.empty()) {
IConsolePrint(CC_DEBUG, "Finished profile of NewGRF [{:08X}], no events collected, not writing a file.", BSWAP32(this->grffile->grfid));
this->Abort();
return 0;
}
@ -116,7 +118,6 @@ uint32 NewGRFProfiler::Finish()
}
this->Abort();
return total_microseconds;
}