From 751b8310ceb123577d2cf8871fee4a3f3197958a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 30 Nov 2022 09:43:49 -0800 Subject: [PATCH] Fix crash when no audio device found --- src/Audio/AudioDevice.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audio/AudioDevice.cs b/src/Audio/AudioDevice.cs index 4f6550c..b297d73 100644 --- a/src/Audio/AudioDevice.cs +++ b/src/Audio/AudioDevice.cs @@ -46,8 +46,8 @@ namespace MoonWorks.Audio if (devices == 0) { Logger.LogError("No audio devices found!"); - Handle = IntPtr.Zero; FAudio.FAudio_Release(Handle); + Handle = IntPtr.Zero; return; }