From 76d05c6310142723efbb69db9effe173b962c5c2 Mon Sep 17 00:00:00 2001 From: v1993 Date: Sat, 25 Sep 2021 23:54:27 +0300 Subject: [PATCH] Fix yuzu segfaulting when homebrew exits Segfault now happens when stopping emulation afterwards. --- src/yuzu/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3c28243626..282acb79d1 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2947,8 +2947,12 @@ void GMainWindow::UpdateStatusBar() { auto& system = Core::System::GetInstance(); auto results = system.GetAndResetPerfStats(); - auto& shader_notify = system.GPU().ShaderNotify(); - const int shaders_building = shader_notify.ShadersBuilding(); + + int shaders_building = 0; + if (system.IsPoweredOn()) { + auto& shader_notify = system.GPU().ShaderNotify(); + shaders_building = shader_notify.ShadersBuilding(); + } if (shaders_building > 0) { shader_building_label->setText(tr("Building: %n shader(s)", "", shaders_building));