From 4e5271fcdf74f55959b8e6b88aff787d57600f8d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Feb 2017 21:10:55 +0100 Subject: [PATCH] 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. --- src/event/Call.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 &&f) { - if (loop.IsInside()) { + if (loop.IsInsideOrNull()) { /* we're already inside the loop - we can simply call the function */ f();