patterns: Fixed pattern limitting dangling pointer
This commit is contained in:
parent
51a98736e8
commit
3543fa4caa
@ -62,9 +62,9 @@ namespace hex::pl {
|
||||
}
|
||||
|
||||
PatternCreationLimiter(const PatternCreationLimiter &other) {
|
||||
if (this->m_evaluator == nullptr) return;
|
||||
|
||||
this->m_evaluator = other.m_evaluator;
|
||||
|
||||
if (this->m_evaluator == nullptr) return;
|
||||
this->m_evaluator->patternCreated();
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ namespace hex::pl {
|
||||
}
|
||||
|
||||
private:
|
||||
Evaluator *m_evaluator;
|
||||
Evaluator *m_evaluator = nullptr;
|
||||
};
|
||||
|
||||
class PatternData : public PatternCreationLimiter {
|
||||
|
Loading…
Reference in New Issue
Block a user