diff --git a/src/newgrf_profiling.cpp b/src/newgrf_profiling.cpp index e0ea3925e1..18b2cd4dd4 100644 --- a/src/newgrf_profiling.cpp +++ b/src/newgrf_profiling.cpp @@ -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; }