1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 19:15:07 +00:00

LibCore: Assert instead of crashing in CEventLoop::current()

This commit is contained in:
Sergey Bugaev 2019-11-26 18:51:18 +03:00 committed by Andreas Kling
parent 8aef0a0755
commit 2f9be662ef

View file

@ -176,7 +176,9 @@ CEventLoop& CEventLoop::main()
CEventLoop& CEventLoop::current()
{
return *s_event_loop_stack->last();
CEventLoop* event_loop = s_event_loop_stack->last();
ASSERT(event_loop != nullptr);
return *event_loop;
}
void CEventLoop::quit(int code)