Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

video_core: Cancel Scoped's exit call on GPU failure

lat9nq173ddc9e6b22
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index 329bf4defd..2f25945858 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -50,6 +50,7 @@ std::unique_ptr<Tegra::GPU> CreateGPU(Core::Frontend::EmuWindow& emu_window, Cor
gpu->BindRenderer(std::move(renderer));
return gpu;
} catch (const std::runtime_error& exception) {
+ scope.Cancel();
LOG_ERROR(HW_GPU, "Failed to initialize GPU: {}", exception.what());
return nullptr;
}