fix: ImHex crashing after splash screen if no plugins are loaded. Closes #315

This commit is contained in:
WerWolv
2021-11-11 18:59:44 +01:00
parent 2e3c43ad9e
commit cb583b5d6c
3 changed files with 25 additions and 12 deletions

View File

@@ -16,19 +16,22 @@ namespace hex {
{
auto columnCount = ContentRegistry::Settings::getSetting("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.column_count");
this->m_columnCount = static_cast<int>(columnCount);
if (columnCount.is_number())
this->m_columnCount = static_cast<int>(columnCount);
}
{
auto greyOutZeros = ContentRegistry::Settings::getSetting("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.grey_zeros");
this->m_greyedOutZeros = static_cast<int>(greyOutZeros);
if (greyOutZeros.is_number())
this->m_greyedOutZeros = static_cast<int>(greyOutZeros);
}
{
auto upperCaseHex = ContentRegistry::Settings::getSetting("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.uppercase_hex");
this->m_upperCaseHex = static_cast<int>(upperCaseHex);
if (upperCaseHex.is_number())
this->m_upperCaseHex = static_cast<int>(upperCaseHex);
}
});