1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

FontEditor: Don't crash on missing icons

Instead of crashing on failed icon loading with TRY(), let's report
missing but non-critical resources in detail and gracefully move on.
This commit is contained in:
thankyouverycool 2023-05-10 17:00:50 -04:00 committed by Andreas Kling
parent ea8bcb2f30
commit 6212e5b1f0
4 changed files with 72 additions and 11 deletions

View file

@ -23,6 +23,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::create(arguments));
FontEditor::g_resources = FontEditor::Resources::create();
TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_scheme("/usr/share/man/man1/Applications/FontEditor.md") }));
TRY(Desktop::Launcher::seal_allowlist());