diff --git a/Ladybird/Utilities.cpp b/Ladybird/Utilities.cpp index fff19182eb8..1e8c994965e 100644 --- a/Ladybird/Utilities.cpp +++ b/Ladybird/Utilities.cpp @@ -26,10 +26,14 @@ constexpr auto libexec_path = "libexec"sv; ByteString s_serenity_resource_root; Optional s_mach_server_name; -Optional mach_server_name() + +Optional mach_server_name() { - return s_mach_server_name; + if (s_mach_server_name.has_value()) + return *s_mach_server_name; + return {}; } + void set_mach_server_name(ByteString name) { s_mach_server_name = move(name); diff --git a/Ladybird/Utilities.h b/Ladybird/Utilities.h index d3cbc935dfb..83436e7278b 100644 --- a/Ladybird/Utilities.h +++ b/Ladybird/Utilities.h @@ -17,5 +17,5 @@ ErrorOr application_directory(); ErrorOr> get_paths_for_helper_process(StringView process_name); extern ByteString s_serenity_resource_root; -Optional mach_server_name(); +Optional mach_server_name(); void set_mach_server_name(ByteString name);