1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibGUI+Applications: Allow GlyphMapWidget's set_font() to fail

And TRY early during initialization in FontEditor to leave the app
in a valid state on error. Fixes OOM crashes when cloning the original
font for highlight modifications.
This commit is contained in:
thankyouverycool 2022-08-15 06:29:32 -04:00 committed by Andreas Kling
parent 1be830e3c6
commit 9725fd162f
4 changed files with 9 additions and 6 deletions

View file

@ -21,7 +21,7 @@ class GlyphMapWidget final : public AbstractScrollableWidget {
public:
virtual ~GlyphMapWidget() override = default;
void set_font(Gfx::Font const&);
ErrorOr<void> set_font(Gfx::Font const&);
class Selection {
public: