Fix assertion on PulseAudio driver exit.

This commit is contained in:
Brandon Wright 2017-12-07 11:36:50 -06:00
parent ec2b9a5165
commit 5e6b9f068a

View File

@ -32,6 +32,9 @@ S9xPulseSoundDriver::terminate (void)
{ {
S9xSetSamplesAvailableCallback (NULL, NULL); S9xSetSamplesAvailableCallback (NULL, NULL);
if (mainloop)
pa_threaded_mainloop_stop (mainloop);
if (stream) if (stream)
{ {
pa_stream_disconnect (stream); pa_stream_disconnect (stream);
@ -46,7 +49,6 @@ S9xPulseSoundDriver::terminate (void)
if (mainloop) if (mainloop)
{ {
pa_threaded_mainloop_stop (mainloop);
pa_threaded_mainloop_free (mainloop); pa_threaded_mainloop_free (mainloop);
} }