summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-12-11 22:32:35 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-12 00:37:29 -0700
commit5a346c4297266a307d9b0f3beb8d53c47b4bfe0f (patch)
tree601277bf2fa414020b485aca714329ec97f53b5e /Userland/Applications
parentcda5a530e63872ee8700c518f51a4ea5dfba8604 (diff)
downloadserenity-5a346c4297266a307d9b0f3beb8d53c47b4bfe0f.zip
Help+LibManual: Without arguments, open index page instead of crashing
This is the old behavior before the recent LibManual refactor. It also moves the definition of the index page into LibManual for better reuse.
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Help/MainWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp
index 0ba220d696..b67390b1eb 100644
--- a/Userland/Applications/Help/MainWidget.cpp
+++ b/Userland/Applications/Help/MainWidget.cpp
@@ -213,7 +213,7 @@ ErrorOr<void> MainWidget::set_start_page(Vector<StringView, 2> query_parameters)
ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
{
- static String const help_index_path = TRY(TRY(try_make_ref_counted<Manual::PageNode>(Manual::sections[7 - 1], TRY(String::from_utf8("Help-index"sv))))->path());
+ static String const help_index_path = TRY(TRY(Manual::PageNode::help_index_page())->path());
m_go_home_action = GUI::CommonActions::make_go_home_action([this](auto&) {
m_history.push(help_index_path);
open_page(help_index_path);