diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/Engine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 1f6fd70c..922935c9 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -100,9 +100,11 @@ Engine::~Engine() // Process all pending events const FrameTime end = std::numeric_limits<FrameTime>::max(); _process_context.locate(_process_context.end(), end - _process_context.end()); - _post_processor->set_end_time(end); - _pre_processor->process(_process_context, *_post_processor, false); - _post_processor->process(); + while (!_pre_processor->empty()) { + _post_processor->set_end_time(end); + _pre_processor->process(_process_context, *_post_processor, false); + _post_processor->process(); + } const SPtr<Store> store = this->store(); if (store) { @@ -354,7 +356,9 @@ Engine::pending_events() void Engine::enqueue_event(Event* ev) { - _pre_processor->event(ev); + if (!_quit_flag) { + _pre_processor->event(ev); + } } unsigned |