mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
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
|
@ -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…
Reference in a new issue