fix: Crashes when having pattern auto evaluation enabled
This commit is contained in:
parent
33e9ad7775
commit
8a2afd1c05
@ -133,6 +133,7 @@ namespace hex::plugin::builtin {
|
||||
PerProvider<std::vector<std::fs::path>> m_possiblePatternFiles;
|
||||
bool m_runAutomatically = false;
|
||||
bool m_triggerEvaluation = false;
|
||||
std::atomic<bool> m_triggerAutoEvaluate = false;
|
||||
|
||||
bool m_lastEvaluationProcessed = true;
|
||||
bool m_lastEvaluationResult = false;
|
||||
|
@ -281,9 +281,13 @@ namespace hex::plugin::builtin {
|
||||
this->parsePattern(code, provider);
|
||||
|
||||
if (this->m_runAutomatically)
|
||||
this->evaluatePattern(code, provider);
|
||||
this->m_triggerAutoEvaluate = true;
|
||||
});
|
||||
}
|
||||
|
||||
if (this->m_triggerAutoEvaluate.exchange(false)) {
|
||||
this->evaluatePattern(this->m_textEditor.GetText(), provider);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->m_dangerousFunctionCalled && !ImGui::IsPopupOpen(ImGuiID(0), ImGuiPopupFlags_AnyPopup)) {
|
||||
|
Loading…
Reference in New Issue
Block a user