mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Fixed an issue where missing theme font files would crash the application.
This commit is contained in:
parent
064e8f81d0
commit
a277b9693b
|
@ -724,5 +724,11 @@ std::shared_ptr<Font> Font::getFromTheme(const ThemeData::ThemeElement* elem,
|
|||
if (properties & FONT_PATH && elem->has("fontPath"))
|
||||
path = elem->get<std::string>("fontPath");
|
||||
|
||||
if (!Utils::FileSystem::exists(path)) {
|
||||
LOG(LogError) << "Font file \"" << path << "\" defined by the theme does not exist, "
|
||||
"falling back to \"" << getDefaultPath() << "\"";
|
||||
path = getDefaultPath();
|
||||
}
|
||||
|
||||
return get(size, path);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue