diff --git a/Userland/Applications/VideoPlayer/main.cpp b/Userland/Applications/VideoPlayer/main.cpp index 363e7cda49..4f75fad855 100644 --- a/Userland/Applications/VideoPlayer/main.cpp +++ b/Userland/Applications/VideoPlayer/main.cpp @@ -27,13 +27,13 @@ ErrorOr serenity_main(Main::Arguments arguments) auto const video_track = track.video_track().value(); auto image = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, Gfx::IntSize(video_track.pixel_height, video_track.pixel_width)).release_value_but_fixme_should_propagate_errors(); - auto& main_widget = window->set_main_widget(); - main_widget.set_fill_with_background_color(true); - main_widget.set_layout(); - auto& image_widget = main_widget.add(); + auto main_widget = TRY(window->try_set_main_widget()); + main_widget->set_fill_with_background_color(true); + main_widget->set_layout(); + auto& image_widget = main_widget->add(); image_widget.set_bitmap(image); image_widget.set_fixed_size(video_track.pixel_height, video_track.pixel_width); - TRY(main_widget.try_add_child(image_widget)); + TRY(main_widget->try_add_child(image_widget)); Video::VP9::Decoder vp9_decoder; for (auto const& cluster : document->clusters()) {