From 9007dd9ab7acd64084944b23fb6fabee785ec617 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Sep 2016 15:09:05 +0200 Subject: [PATCH] output/Thread: clear Filter pointers in CloseFilter() This allows calling CloseFilter() multiple times. --- src/output/OutputThread.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 53fc2edfb..cfc68a877 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -132,8 +132,13 @@ AudioOutput::CloseFilter() software_mixer_set_filter(*mixer, nullptr); delete replay_gain_filter_instance; + replay_gain_filter_instance = nullptr; + delete other_replay_gain_filter_instance; + other_replay_gain_filter_instance = nullptr; + delete filter_instance; + filter_instance = nullptr; } inline void