diff options
author | bunnei <bunneidev@gmail.com> | 2019-10-18 16:50:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 16:50:01 +0200 |
commit | 8d009a7aae129ce7bc9b33e047f5344ebdc3ab92 (patch) | |
tree | c0ce48b7102eef1ad4b8a88049231126866c31b3 /src/core | |
parent | Merge pull request #2994 from lioncash/fmt (diff) | |
parent | Fix null pointer deref. (diff) | |
download | yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar.gz yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar.bz2 yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar.lz yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar.xz yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.tar.zst yuzu-8d009a7aae129ce7bc9b33e047f5344ebdc3ab92.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index a30253c50..9612e4bca 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -240,16 +240,18 @@ struct System::Impl { } void Shutdown() { - // Log last frame performance stats - const auto perf_results = GetAndResetPerfStats(); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_EmulationSpeed", - perf_results.emulation_speed * 100.0); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Framerate", - perf_results.game_fps); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Frametime", - perf_results.frametime * 1000.0); - telemetry_session->AddField(Telemetry::FieldType::Performance, "Mean_Frametime_MS", - perf_stats->GetMeanFrametime()); + // Log last frame performance stats if game was loded + if (perf_stats) { + const auto perf_results = GetAndResetPerfStats(); + telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_EmulationSpeed", + perf_results.emulation_speed * 100.0); + telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Framerate", + perf_results.game_fps); + telemetry_session->AddField(Telemetry::FieldType::Performance, "Shutdown_Frametime", + perf_results.frametime * 1000.0); + telemetry_session->AddField(Telemetry::FieldType::Performance, "Mean_Frametime_MS", + perf_stats->GetMeanFrametime()); + } lm_manager.Flush(); |