mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-17 19:28:43 -06:00
fix: Crashes when having pattern auto evaluation enabled
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user