aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Ipc
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Ipc')
-rw-r--r--Ryujinx.HLE/HOS/Ipc/IpcHandler.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Ipc/IpcHandler.cs b/Ryujinx.HLE/HOS/Ipc/IpcHandler.cs
index 08a4cdb5..fca995c0 100644
--- a/Ryujinx.HLE/HOS/Ipc/IpcHandler.cs
+++ b/Ryujinx.HLE/HOS/Ipc/IpcHandler.cs
@@ -73,7 +73,10 @@ namespace Ryujinx.HLE.HOS.Ipc
{
int Unknown = ReqReader.ReadInt32();
- int Handle = Process.HandleTable.OpenHandle(Session);
+ if (Process.HandleTable.GenerateHandle(Session, out int Handle) != KernelResult.Success)
+ {
+ throw new InvalidOperationException("Out of handles!");
+ }
Response.HandleDesc = IpcHandleDesc.MakeMove(Handle);