mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:57:45 +00:00
Userland: Always construct Application with try_create()
This commit is contained in:
parent
cd7037afd5
commit
73552c1856
22 changed files with 22 additions and 22 deletions
|
@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
// A Core::EventLoop is all we need, but ConnectionToWindowServer needs a full Application object.
|
||||
char* dummy_argv[] = { arguments.argv[0] };
|
||||
auto app = GUI::Application::construct(1, dummy_argv);
|
||||
auto app = TRY(GUI::Application::try_create(1, dummy_argv));
|
||||
auto screen_layout = GUI::ConnectionToWindowServer::the().get_screen_layout();
|
||||
if (screen < 0 || (size_t)screen >= screen_layout.screens.size()) {
|
||||
warnln("invalid screen index: {}", screen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue