Prevent crash on program close (null stream fix) (#838)
* Fix Access Violation * Fix AccessViolation
This commit is contained in:
1 parent
ff26565143
commit
8c48e37c4f
1 file changed
+6
-1
@@ -176,6 +176,11 @@ namespace Vocaluxe.Lib.Sound
|
||||
|
||||
try
|
||||
{
|
||||
if (stream == IntPtr.Zero)
|
||||
{
|
||||
CLog.Debug("Stream is null, skipping close.");
|
||||
return;
|
||||
}
|
||||
PortAudio.Pa_CloseStream(stream);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -235,4 +240,4 @@ namespace Vocaluxe.Lib.Sound
|
||||
return selectedHostApi;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user