diff options
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGfx/Font.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibGfx/Font.cpp b/Libraries/LibGfx/Font.cpp index 409d581a3e..ebb1933ab2 100644 --- a/Libraries/LibGfx/Font.cpp +++ b/Libraries/LibGfx/Font.cpp @@ -178,6 +178,9 @@ RefPtr<Font> Font::load_from_file(const StringView& path) return nullptr; auto font = load_from_memory((const u8*)mapped_file.data()); + if (!font) + return nullptr; + font->m_mapped_file = move(mapped_file); return font; } |