فهرست منبع

hle: service: Ensure system is powered on before writing IPC result.

bunnei 5 سال پیش
والد
کامیت
bea51d948d
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      src/core/hle/service/service.cpp

+ 5 - 1
src/core/hle/service/service.cpp

@@ -184,7 +184,11 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
         UNIMPLEMENTED_MSG("command_type={}", context.GetCommandType());
     }
 
-    context.WriteToOutgoingCommandBuffer(context.GetThread());
+    // If emulation was shutdown, we are closing service threads, do not write the response back to
+    // memory that may be shutting down as well.
+    if (system.IsPoweredOn()) {
+        context.WriteToOutgoingCommandBuffer(context.GetThread());
+    }
 
     return RESULT_SUCCESS;
 }