diff --git a/src/core/core.cpp b/src/core/core.cpp index 1e48c0c620..2a99d3ccc2 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -296,7 +296,8 @@ void System::PrepareReschedule() { } PerfStats::Results System::GetAndResetPerfStats() { - return perf_stats->GetAndResetStats(timing->GetGlobalTimeUs()); + return (perf_stats && timing) ? perf_stats->GetAndResetStats(timing->GetGlobalTimeUs()) + : PerfStats::Results{}; } void System::Reschedule() {