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
+5
@@ -176,6 +176,11 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (stream == IntPtr.Zero)
|
||||||
|
{
|
||||||
|
CLog.Debug("Stream is null, skipping close.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
PortAudio.Pa_CloseStream(stream);
|
PortAudio.Pa_CloseStream(stream);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in new issue
Block a user