summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2020-10-28 17:17:38 -0700
committerGravatar bunnei2020-11-01 01:52:38 -0700
commit1d4cbb92f2f2c1702fe5843c6ece471f53d2b2d9 (patch)
treea4e9cebc24c2b7664f936e97d85317de14025ed2
parentvideo_core: gpu: Implement WaitFence and IncrementSyncPoint. (diff)
downloadyuzu-1d4cbb92f2f2c1702fe5843c6ece471f53d2b2d9.tar.gz
yuzu-1d4cbb92f2f2c1702fe5843c6ece471f53d2b2d9.tar.xz
yuzu-1d4cbb92f2f2c1702fe5843c6ece471f53d2b2d9.zip
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 c64673dba..44aa2bdae 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -242,6 +242,10 @@ void NVFlinger::Compose() {
242 242
243 const auto& igbp_buffer = buffer->get().igbp_buffer; 243 const auto& igbp_buffer = buffer->get().igbp_buffer;
244 244
245 if (!system.IsPoweredOn()) {
246 return; // We are likely shutting down
247 }
248
245 auto& gpu = system.GPU(); 249 auto& gpu = system.GPU();
246 const auto& multi_fence = buffer->get().multi_fence; 250 const auto& multi_fence = buffer->get().multi_fence;
247 guard->unlock(); 251 guard->unlock();