aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs')
-rw-r--r--Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
index 344dd9b6..ceb6e706 100644
--- a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
+++ b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
@@ -201,7 +201,7 @@ namespace Ryujinx.Audio.Backends.SDL2
protected virtual void Dispose(bool disposing)
{
- if (disposing)
+ if (disposing && _driver.Unregister(this))
{
PrepareToClose();
Stop();
@@ -210,8 +210,6 @@ namespace Ryujinx.Audio.Backends.SDL2
{
SDL_CloseAudioDevice(_outputStream);
}
-
- _driver.Unregister(this);
}
}