1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: Potential crash when loading null values from settings

This commit is contained in:
WerWolv 2023-11-18 17:23:50 +01:00
parent 8f4839d8ff
commit a3f74098f2

View File

@ -163,6 +163,8 @@ namespace hex {
if (setting.is_number() && defaultValue.is_boolean()) if (setting.is_number() && defaultValue.is_boolean())
setting = setting.get<int>() != 0; setting = setting.get<int>() != 0;
if (setting.is_null())
setting = defaultValue;
return setting; return setting;
} }