Applets/Audio: Propagate errors with try_set_main_widget
Use try_set_main_widget instead of set_main_widget.
This commit is contained in:
parent
99e0b69c0c
commit
a550c20c35
Notes:
sideshowbarker
2024-07-17 21:45:19 +09:00
Author: https://github.com/creator1creeper1 Commit: https://github.com/SerenityOS/serenity/commit/a550c20c35b Pull-request: https://github.com/SerenityOS/serenity/pull/11419
1 changed files with 1 additions and 1 deletions
|
@ -225,7 +225,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_title("Audio");
|
||||
window->set_window_type(GUI::WindowType::Applet);
|
||||
|
||||
window->set_main_widget<AudioWidget>();
|
||||
auto audio_widget = TRY(window->try_set_main_widget<AudioWidget>());
|
||||
window->show();
|
||||
|
||||
// This positioning code depends on the window actually existing.
|
||||
|
|
Loading…
Add table
Reference in a new issue