1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-12-20 13:55:19 +01: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 SmallJoker
parent a65a46b889
commit 313ca53b36
3 changed files with 100 additions and 15 deletions

View File

@@ -135,8 +135,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;
@@ -165,8 +167,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;