mixer/alsa: reset the MultiSocketMonitor in the destructor
Fixes potential crash bug.
This commit is contained in:
parent
eda06993f8
commit
29e1b6e465
2
NEWS
2
NEWS
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue