mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibCore: Assert instead of crashing in CEventLoop::current()
This commit is contained in:
parent
8aef0a0755
commit
2f9be662ef
Notes:
sideshowbarker
2024-07-19 11:04:23 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/2f9be662ef7 Pull-request: https://github.com/SerenityOS/serenity/pull/827
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue