diff options
| author | givethesourceplox <itsports@proton.me> | 2026-10-30 11:09:38 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-30 15:09:38 +0100 |
| commit | 24e3cb462e47b22edda334939123694ff6920e95 (patch) | |
| tree | c27055d88bd0d179697e9ef425b9fd0b907033e7 /src | |
| parent | 0585eab41a10ceb63f0e293dfe79b9f878891ec7 (diff) | |
core: return empty perf stats before the system is running (#30)
The SDL frontend's title timer can fire before perf_stats exists and
crashed on its null mutex during boot.
Assisted-by: Claude (Anthropic)
Co-authored-by: givethesourceplox <272928635+givethesourceplox@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 3728ccf8f7..64e1d8de06 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -496,6 +496,9 @@ struct System::Impl { } PerfStatsResults GetAndResetPerfStats() { + if (!perf_stats) { + return {}; + } return perf_stats->GetAndResetStats(core_timing.GetGlobalTimeUs()); } |
