From 536c6df438abc9d365c8d8ef37a94a827d4dc8a7 Mon Sep 17 00:00:00 2001 From: Lukas Cone Date: Fri, 19 Aug 2022 23:01:57 +0200 Subject: [PATCH] fix: Race condition when evaluating patterns (#696) --- plugins/builtin/source/content/views/view_pattern_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp index 48733f007..f55970fb7 100644 --- a/plugins/builtin/source/content/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -108,7 +108,7 @@ namespace hex::plugin::builtin { void ViewPatternData::drawContent() { if (ImGui::Begin(View::toWindowName("hex.builtin.view.pattern_data.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { auto provider = ImHexApi::Provider::get(); - if (ImHexApi::Provider::isValid() && provider->isReadable()) { + if (ImHexApi::Provider::isValid() && provider->isReadable() && !ProviderExtraData::get(provider).patternLanguage.runtime->isRunning()) { auto &sortedPatterns = this->m_sortedPatterns[ImHexApi::Provider::get()]; if (beginPatternTable(provider, ProviderExtraData::get(provider).patternLanguage.runtime->getPatterns(), sortedPatterns)) { @@ -126,4 +126,4 @@ namespace hex::plugin::builtin { ImGui::End(); } -} \ No newline at end of file +}