summaryrefslogtreecommitdiff
path: root/src/event
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-09 21:10:55 +0100
committerMax Kellermann <max@musicpd.org>2017-02-09 21:12:23 +0100
commit4e5271fcdf74f55959b8e6b88aff787d57600f8d (patch)
treeeea84139ae1c4a0a52c7d897d1268326da84c97b /src/event
parent3c55487a16efbb4ac1b615e2bf5283f59b7408da (diff)
event/Call: allow usage during shutdown
Change EventLoop::IsInside() call to EventLoop::IsInsideOrNull(). This means that BlockingCall() may be used during shutdown, after the main EventLoop::Run() has finished. This is important because mixers are currently registered in the main EventLoop.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/Call.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/Call.cxx b/src/event/Call.cxx
index f3eb82235..ded252645 100644
--- a/src/event/Call.cxx
+++ b/src/event/Call.cxx
@@ -79,7 +79,7 @@ private:
void
BlockingCall(EventLoop &loop, std::function<void()> &&f)
{
- if (loop.IsInside()) {
+ if (loop.IsInsideOrNull()) {
/* we're already inside the loop - we can simply call
the function */
f();