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
|
- id3: fix memory leak on corrupt ID3 tags
|
||||||
* decoder
|
* decoder
|
||||||
- sidplay: don't require libsidutils when building with libsidplayfp
|
- sidplay: don't require libsidutils when building with libsidplayfp
|
||||||
|
* mixer
|
||||||
|
- alsa: fix crash bug
|
||||||
|
|
||||||
ver 0.20.4 (2017/02/01)
|
ver 0.20.4 (2017/02/01)
|
||||||
* input
|
* input
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "output/OutputAPI.hxx"
|
#include "output/OutputAPI.hxx"
|
||||||
#include "event/MultiSocketMonitor.hxx"
|
#include "event/MultiSocketMonitor.hxx"
|
||||||
#include "event/DeferredMonitor.hxx"
|
#include "event/DeferredMonitor.hxx"
|
||||||
|
#include "event/Call.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
#include "util/ReusableArray.hxx"
|
#include "util/ReusableArray.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
|
@ -53,6 +54,12 @@ public:
|
||||||
DeferredMonitor::Schedule();
|
DeferredMonitor::Schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~AlsaMixerMonitor() {
|
||||||
|
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
|
||||||
|
MultiSocketMonitor::Reset();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void RunDeferred() override {
|
virtual void RunDeferred() override {
|
||||||
InvalidateSockets();
|
InvalidateSockets();
|
||||||
|
|
Loading…
Reference in New Issue