mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-12 07:18:41 -06:00
fix: Yara matching not being interruptable
This commit is contained in:
@@ -78,6 +78,10 @@ namespace hex {
|
||||
return this->m_hadException;
|
||||
}
|
||||
|
||||
bool Task::shouldInterrupt() const {
|
||||
return this->m_shouldInterrupt;
|
||||
}
|
||||
|
||||
bool Task::wasInterrupted() const {
|
||||
return this->m_interrupted;
|
||||
}
|
||||
@@ -136,6 +140,14 @@ namespace hex {
|
||||
return !task->hadException();
|
||||
}
|
||||
|
||||
bool TaskHolder::shouldInterrupt() const {
|
||||
if (this->m_task.expired())
|
||||
return false;
|
||||
|
||||
auto task = this->m_task.lock();
|
||||
return !task->shouldInterrupt();
|
||||
}
|
||||
|
||||
bool TaskHolder::wasInterrupted() const {
|
||||
if (this->m_task.expired())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user