From 73cc655de7b2b6ff15d96cea7f72f43b6ab07976 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 21 May 2017 18:05:21 +0200 Subject: [PATCH] Cleanups --- audio/audio_driver.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 4fb496a04b..71e534aad5 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -956,20 +956,16 @@ static void audio_driver_mixer_remove_stream(unsigned i) switch (audio_mixer_streams[i].state) { case AUDIO_STREAM_STATE_PLAYING: - audio_mixer_stop(voice); -#if 1 - /* TODO - crashes at this part */ + if (voice) + audio_mixer_stop(voice); if (handle) audio_mixer_destroy(handle); -#endif break; case AUDIO_STREAM_STATE_PLAYING_LOOPED: - audio_mixer_stop(voice); -#if 1 - /* TODO - crashes at this part */ + if (voice) + audio_mixer_stop(voice); if (handle) audio_mixer_destroy(handle); -#endif break; case AUDIO_STREAM_STATE_STOPPED: if (handle)