mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
patterns: Fixed crash when using attributes
This commit is contained in:
@@ -44,8 +44,10 @@ namespace hex::pl {
|
||||
Attributable(const Attributable &other) {
|
||||
for (auto &attribute : other.m_attributes) {
|
||||
auto copy = attribute->clone();
|
||||
if (auto node = dynamic_cast<ASTNodeAttribute *>(copy.get()))
|
||||
if (auto node = dynamic_cast<ASTNodeAttribute *>(copy.get())) {
|
||||
this->m_attributes.push_back(std::unique_ptr<ASTNodeAttribute>(node));
|
||||
(void)copy.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user