1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Bug 2070 - Linux: Crash on Rescan Audio Devices if Jack already stopped

This commit is contained in:
Leland Lucius 2020-03-18 16:36:47 -05:00
parent 6f5f586b19
commit 477c9d2a4e

View File

@ -1008,12 +1008,18 @@ static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
/* note: this automatically disconnects all ports, since a deactivated /* note: this automatically disconnects all ports, since a deactivated
* client is not allowed to have any ports connected */ * client is not allowed to have any ports connected */
if( !jackHostApi->jackIsDown )
{
ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 ); ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 );
}
PaJack_TerminateHostApiMutex( jackHostApi ); PaJack_TerminateHostApiMutex( jackHostApi );
PaJack_TerminateCommandSync( jackHostApi ); PaJack_TerminateCommandSync( jackHostApi );
if( !jackHostApi->jackIsDown )
{
ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 ); ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 );
}
if( jackHostApi->deviceInfoMemory ) if( jackHostApi->deviceInfoMemory )
{ {