mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibConfig: VERIFY that a Core::EventLoop exists before connecting
It's not possible to connect to ConfigServer without having an event loop available. This VERIFY makes it much easier to understand why things are not working. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 05:17:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/870ecd5190b
@@ -12,8 +12,10 @@ static RefPtr<Client> s_the = nullptr;
|
||||
|
||||
Client& Client::the()
|
||||
{
|
||||
if (!s_the || !s_the->is_open())
|
||||
if (!s_the || !s_the->is_open()) {
|
||||
VERIFY(Core::EventLoop::has_been_instantiated());
|
||||
s_the = Client::construct();
|
||||
}
|
||||
return *s_the;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user