fix: Opening pattern sections not working

This commit is contained in:
WerWolv
2025-09-08 19:53:51 +02:00
parent a0326c4371
commit 8661b6551d

View File

@@ -143,11 +143,9 @@ namespace hex::plugin::builtin {
if (ImGui::BeginPopup("##PatternDataContextMenu")) {
if (ImGui::MenuItemEx("hex.builtin.view.pattern_data.section.view_raw"_lang, ICON_VS_OPEN_PREVIEW)) {
if (TRY_LOCK(ContentRegistry::PatternLanguage::getRuntimeLock())) {
if (auto it = sections.find(selectedSection); it != sections.end()) {
const auto &[sectionId, section] = *it;
ImHexApi::Provider::add<prv::MemoryProvider>(section.data, section.name);
}
if (auto it = sections.find(selectedSection); it != sections.end()) {
const auto &[sectionId, section] = *it;
ImHexApi::Provider::add<prv::MemoryProvider>(section.data, section.name);
}
}
ImGui::EndPopup();