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

master
bunnei 2020-12-14 17:58:12 +07:00
parent 6d2f9428c5
commit bea51d948d
1 changed files with 5 additions and 1 deletions

@ -184,7 +184,11 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
UNIMPLEMENTED_MSG("command_type={}", context.GetCommandType()); UNIMPLEMENTED_MSG("command_type={}", context.GetCommandType());
} }
// 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()); context.WriteToOutgoingCommandBuffer(context.GetThread());
}
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }