1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed globals lookup inside extensions

This commit is contained in:
Brian Fiete 2020-09-24 05:12:10 -07:00
parent 7f56fecc6c
commit 9895e0a86d

View file

@ -3310,6 +3310,8 @@ void BfModule::PopulateGlobalContainersList(const BfGlobalLookup& globalLookup)
BP_ZONE("PopulateGlobalContainersList"); BP_ZONE("PopulateGlobalContainersList");
BfTypeDef* userTypeDef = mContext->mCurTypeState->mCurTypeDef; BfTypeDef* userTypeDef = mContext->mCurTypeState->mCurTypeDef;
if ((userTypeDef == NULL) && (mCurMethodInstance != NULL))
userTypeDef = mCurMethodInstance->mMethodDef->mDeclaringType;
if (userTypeDef == NULL) if (userTypeDef == NULL)
userTypeDef = mCurTypeInstance->mTypeDef; userTypeDef = mCurTypeInstance->mTypeDef;