pa_front.c: fix initializationCount_ in Pa_Terminate()
Was decrementing too soon and causing Pa_CloseStream() to fail. See ticket #260
This commit is contained in:
parent
49d0634189
commit
dde71d1114
1 changed files with 3 additions and 1 deletions
|
|
@ -390,7 +390,8 @@ PaError Pa_Terminate( void )
|
||||||
|
|
||||||
if( PA_IS_INITIALISED_ )
|
if( PA_IS_INITIALISED_ )
|
||||||
{
|
{
|
||||||
if( --initializationCount_ == 0 )
|
// leave initializationCount_>0 so that Pa_CloseStream() can execute
|
||||||
|
if( initializationCount_ == 1 )
|
||||||
{
|
{
|
||||||
CloseOpenStreams();
|
CloseOpenStreams();
|
||||||
|
|
||||||
|
|
@ -398,6 +399,7 @@ PaError Pa_Terminate( void )
|
||||||
|
|
||||||
PaUtil_DumpTraceMessages();
|
PaUtil_DumpTraceMessages();
|
||||||
}
|
}
|
||||||
|
--initializationCount_;
|
||||||
result = paNoError;
|
result = paNoError;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue