1
Fork 0
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:
Sam Atkins 2023-01-06 12:21:12 +00:00 committed by Linus Groh
parent f9f6bf3cd4
commit e193679352
3 changed files with 13 additions and 6 deletions

View file

@ -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);