소스 검색

service: hle: nvflinger: Fix potential shutdown crash when GPU is destroyed.

bunnei 5 년 전
부모
커밋
1d4cbb92f2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/core/hle/service/nvflinger/nvflinger.cpp

+ 4 - 0
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();