diff --git a/plugins/libimhex/include/hex/lang/pattern_data.hpp b/plugins/libimhex/include/hex/lang/pattern_data.hpp index 883ef6578..93f72e583 100644 --- a/plugins/libimhex/include/hex/lang/pattern_data.hpp +++ b/plugins/libimhex/include/hex/lang/pattern_data.hpp @@ -221,7 +221,6 @@ namespace hex::lang { public: PatternDataPointer(u64 offset, size_t size, u32 color = 0) : PatternData(offset, size, color), m_pointedAt(nullptr) { - this->m_pointedAt->setVariableName("*" + this->m_pointedAt->getVariableName()); } PatternDataPointer(const PatternDataPointer &other) : PatternData(other.getOffset(), other.getSize(), other.getColor()) { @@ -289,6 +288,7 @@ namespace hex::lang { void setPointedAtPattern(PatternData *pattern) { this->m_pointedAt = pattern; + this->m_pointedAt->setVariableName("*" + this->m_pointedAt->getVariableName()); } [[nodiscard]] PatternData* getPointedAtPattern() {