mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
PixelPaint: Propagate errors when creating images or layers
This fixes a dozen release_value_but_fixme_should_propage_errors
This commit is contained in:
parent
25f2e4981c
commit
0ca1247a7f
3 changed files with 54 additions and 24 deletions
|
@ -50,7 +50,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto main_widget = TRY(window->try_set_main_widget<PixelPaint::MainWidget>());
|
||||
|
||||
main_widget->initialize_menubar(*window);
|
||||
TRY(main_widget->initialize_menubar(*window));
|
||||
|
||||
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
|
||||
if (main_widget->request_close())
|
||||
|
@ -79,7 +79,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
main_widget->open_image(response.value());
|
||||
} else {
|
||||
main_widget->create_default_image();
|
||||
TRY(main_widget->create_default_image());
|
||||
}
|
||||
|
||||
return app->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue