mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:38:13 +00:00
Spider: Make Game creation fallible
This commit is contained in:
parent
f9f6bf3cd4
commit
e193679352
3 changed files with 13 additions and 6 deletions
|
@ -118,7 +118,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
update_statistic_display(StatisticDisplay::HighScore);
|
||||
|
||||
auto widget = TRY(window->try_set_main_widget<GUI::Widget>());
|
||||
widget->load_from_gml(spider_gml);
|
||||
TRY(widget->try_load_from_gml(spider_gml));
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Spider::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue