1
0
mirror of synced 2024-09-27 04:58:26 +02:00

patterns: Fixed pattern limitting dangling pointer

This commit is contained in:
WerWolv 2021-10-03 23:07:33 +02:00
parent 51a98736e8
commit 3543fa4caa

View File

@ -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 {