aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-28 17:17:38 -0700
committerbunnei <bunneidev@gmail.com>2020-11-01 01:52:38 -0700
commit1d4cbb92f2f2c1702fe5843c6ece471f53d2b2d9 (patch)
treea4e9cebc24c2b7664f936e97d85317de14025ed2
parent6053b955525be69eb73a928a7bdd43ba8f5e69a7 (diff)
service: hle: nvflinger: Fix potential shutdown crash when GPU is destroyed.
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index c64673dba5..44aa2bdaea 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -242,6 +242,10 @@ void NVFlinger::Compose() {
const auto& igbp_buffer = buffer->get().igbp_buffer;
+ if (!system.IsPoweredOn()) {
+ return; // We are likely shutting down
+ }
+
auto& gpu = system.GPU();
const auto& multi_fence = buffer->get().multi_fence;
guard->unlock();