1
0
mirror of synced 2024-11-12 10:10:53 +01:00

patterns/fix: Accessing variables in global scope no longer crashes

This commit is contained in:
WerWolv 2021-04-18 20:26:23 +02:00
parent ebbbcafe5c
commit 5b692067d8

View File

@ -81,7 +81,8 @@ namespace hex::lang {
PatternData *currPattern = nullptr;
// Local member access
currPattern = this->findPattern(*this->m_currMembers.back(), path);
if (!this->m_currMembers.empty())
currPattern = this->findPattern(*this->m_currMembers.back(), path);
// If no local member was found, try globally
if (currPattern == nullptr) {