Commit 29e1b6e4 authored by Max Kellermann's avatar Max Kellermann

mixer/alsa: reset the MultiSocketMonitor in the destructor

Fixes potential crash bug.
parent eda06993
......@@ -3,6 +3,8 @@ ver 0.20.5 (not yet released)
- id3: fix memory leak on corrupt ID3 tags
* decoder
- sidplay: don't require libsidutils when building with libsidplayfp
* mixer
- alsa: fix crash bug
ver 0.20.4 (2017/02/01)
* input
......
......@@ -23,6 +23,7 @@
#include "output/OutputAPI.hxx"
#include "event/MultiSocketMonitor.hxx"
#include "event/DeferredMonitor.hxx"
#include "event/Call.hxx"
#include "util/ASCII.hxx"
#include "util/ReusableArray.hxx"
#include "util/Domain.hxx"
......@@ -53,6 +54,12 @@ public:
DeferredMonitor::Schedule();
}
~AlsaMixerMonitor() {
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
MultiSocketMonitor::Reset();
});
}
private:
virtual void RunDeferred() override {
InvalidateSockets();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment