1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Fix issue Minetest crash when custom font path is not exist

We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
This commit is contained in:
Muhammad Rifqi Priyo Susanto 2017-06-03 09:51:48 +07:00 committed by sfan5
parent d693f95fc3
commit 9526c68699
3 changed files with 100 additions and 15 deletions

View file

@ -129,8 +129,10 @@ public:
***********/
const SettingsEntry &getEntry(const std::string &name) const;
const SettingsEntry &getEntryDefault(const std::string &name) const;
Settings *getGroup(const std::string &name) const;
const std::string &get(const std::string &name) const;
const std::string &getDefault(const std::string &name) const;
bool getBool(const std::string &name) const;
u16 getU16(const std::string &name) const;
s16 getS16(const std::string &name) const;
@ -160,8 +162,10 @@ public:
***************************************/
bool getEntryNoEx(const std::string &name, SettingsEntry &val) const;
bool getEntryDefaultNoEx(const std::string &name, SettingsEntry &val) const;
bool getGroupNoEx(const std::string &name, Settings *&val) const;
bool getNoEx(const std::string &name, std::string &val) const;
bool getDefaultNoEx(const std::string &name, std::string &val) const;
bool getFlag(const std::string &name) const;
bool getU16NoEx(const std::string &name, u16 &val) const;
bool getS16NoEx(const std::string &name, s16 &val) const;