mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
LibCore: Assert instead of crashing in CEventLoop::current()
This commit is contained in:
parent
8aef0a0755
commit
2f9be662ef
1 changed files with 3 additions and 1 deletions
|
@ -176,7 +176,9 @@ CEventLoop& CEventLoop::main()
|
||||||
|
|
||||||
CEventLoop& CEventLoop::current()
|
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)
|
void CEventLoop::quit(int code)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue