1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed crash attempting to bind function to const

This commit is contained in:
Brian Fiete 2024-12-02 12:06:45 -05:00
parent 3864a8896b
commit 7ca654aab1
3 changed files with 31 additions and 2 deletions

View file

@ -6805,7 +6805,8 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
{
// We're attempting to directly invoke a non-virtual interface method, this will happen during the unspecialized pass
// OR if we had an error and didn't find an implementing member in the actual target
if ((!mModule->mCurMethodInstance->mIsUnspecialized) && (!mModule->mCurTypeInstance->IsInterface()))
if (((mModule->mCurMethodInstance == NULL) || (!mModule->mCurMethodInstance->mIsUnspecialized)) &&
(!mModule->mCurTypeInstance->IsInterface()))
mModule->AssertErrorState();
if (returnType->IsInterface())