mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
fix: Race condition causing old patterns to stick around in the pattern drawer
This commit is contained in:
@@ -1709,10 +1709,11 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void ViewPatternEditor::evaluatePattern(const std::string &code, prv::Provider *provider) {
|
||||
EventPatternEvaluating::post();
|
||||
|
||||
auto lock = std::scoped_lock(ContentRegistry::PatternLanguage::getRuntimeLock());
|
||||
|
||||
ContentRegistry::PatternLanguage::getRuntime().reset();
|
||||
EventPatternEvaluating::post();
|
||||
|
||||
m_runningEvaluators += 1;
|
||||
m_executionDone.get(provider) = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user