From cb3a643f3549e9bc3d5df37e8a1ffb857df4b2f3 Mon Sep 17 00:00:00 2001 From: creator1creeper1 Date: Fri, 7 Jan 2022 15:24:14 +0100 Subject: [PATCH] Inspector: Propagate errors using try_set_main_widget in main --- Userland/DevTools/Inspector/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp index 805bd77105..ac32571ac7 100644 --- a/Userland/DevTools/Inspector/main.cpp +++ b/Userland/DevTools/Inspector/main.cpp @@ -95,11 +95,11 @@ ErrorOr serenity_main(Main::Arguments arguments) })); help_menu.add_action(GUI::CommonActions::make_about_action("Inspector", app_icon, window)); - auto& widget = window->set_main_widget(); - widget.set_fill_with_background_color(true); - widget.set_layout(); + auto widget = TRY(window->try_set_main_widget()); + widget->set_fill_with_background_color(true); + widget->set_layout(); - auto& splitter = widget.add(); + auto& splitter = widget->add(); remote_process.on_update = [&] { if (!remote_process.process_name().is_null())