1
0
mirror of synced 2025-01-31 03:53:44 +01:00

fix: Crash due to uninitialized data visualizer in hex editor

This commit is contained in:
WerWolv 2023-06-05 09:45:03 +02:00
parent 7c23b215ba
commit 60a95eddd7

View File

@ -71,6 +71,8 @@ namespace hex::plugin::builtin::ui {
/* Hex Editor */ /* Hex Editor */
HexEditor::HexEditor(prv::Provider *provider) : m_provider(provider) { HexEditor::HexEditor(prv::Provider *provider) : m_provider(provider) {
this->m_currDataVisualizer = ContentRegistry::HexEditor::impl::getVisualizers()["hex.builtin.visualizer.hexadecimal.8bit"];
EventManager::subscribe<EventSettingsChanged>(this, [this] { EventManager::subscribe<EventSettingsChanged>(this, [this] {
{ {
this->m_bytesPerRow = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.bytes_per_row", 16); this->m_bytesPerRow = ContentRegistry::Settings::read("hex.builtin.setting.hex_editor", "hex.builtin.setting.hex_editor.bytes_per_row", 16);