mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:35:09 +00:00
CEventLoop: When asked to exit the event loop, exit right away.
Don't process any more events. We already prepend the remaining events in this loop to the outer loop if needed. If there were any more events queued after the exit request, the iteration code would make an invalid access into 'queued_events'. Fixes #300.
This commit is contained in:
parent
f5a9b27f3f
commit
302cae5c2f
1 changed files with 1 additions and 0 deletions
|
@ -139,6 +139,7 @@ void CEventLoop::pump(WaitMode mode)
|
|||
auto rejigged_event_queue = move(events);
|
||||
rejigged_event_queue.append(move(m_queued_events));
|
||||
m_queued_events = move(rejigged_event_queue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue