Skip to content

Commit

Permalink
Merge branch 'ticket_260_terminate' into 'master'
Browse files Browse the repository at this point in the history
pa_front.c: fix initializationCount_ in Pa_Terminate()

+1: Ross Bencina

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/4012103
  • Loading branch information
philburk committed Oct 24, 2016
2 parents 49d0634 + dde71d1 commit 396fe4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/pa_front.c
Expand Up @@ -390,14 +390,16 @@ PaError Pa_Terminate( void )

if( PA_IS_INITIALISED_ )
{
if( --initializationCount_ == 0 )
// leave initializationCount_>0 so that Pa_CloseStream() can execute
if( initializationCount_ == 1 )
{
CloseOpenStreams();

TerminateHostApis();

PaUtil_DumpTraceMessages();
}
--initializationCount_;
result = paNoError;
}
else
Expand Down

0 comments on commit 396fe4b

Please sign in to comment.