fix: Potential crash when loading null values from settings
This commit is contained in:
parent
8f4839d8ff
commit
a3f74098f2
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user