fix: Crash when re-opening a custom section window while having a selection in it
This commit is contained in:
parent
971c8739ca
commit
b042b8327a
@ -526,6 +526,9 @@ namespace hex::plugin::builtin {
|
||||
dataProvider->writeRaw(0x00, section.data.data(), section.data.size());
|
||||
dataProvider->setReadOnly(true);
|
||||
|
||||
if (auto selection = ImHexApi::HexEditor::getSelection(); selection.has_value() && selection->provider != ImHexApi::Provider::get())
|
||||
EventManager::post<EventRegionSelected>(ImHexApi::HexEditor::ProviderRegion { { 0x00, 0x00 }, nullptr });
|
||||
|
||||
auto hexEditor = auto(this->m_sectionHexEditor);
|
||||
|
||||
hexEditor.setBackgroundHighlightCallback([this, id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user