aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Aud/AudioOut
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Aud/AudioOut')
-rw-r--r--Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs
index 2b0b5293..cd3d6e49 100644
--- a/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs
+++ b/Ryujinx.HLE/HOS/Services/Aud/AudioOut/IAudioOut.cs
@@ -67,7 +67,10 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioOut
public long RegisterBufferEvent(ServiceCtx Context)
{
- int Handle = Context.Process.HandleTable.OpenHandle(ReleaseEvent);
+ if (Context.Process.HandleTable.GenerateHandle(ReleaseEvent.ReadableEvent, out int Handle) != KernelResult.Success)
+ {
+ throw new InvalidOperationException("Out of handles!");
+ }
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);