mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
#CallerExpression crash on empty argument
This commit is contained in:
parent
6edb74aaf9
commit
11b9463fcd
1 changed files with 6 additions and 2 deletions
|
@ -5977,8 +5977,12 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
||||||
int exprIdx = constGep32_2->mIdx1;
|
int exprIdx = constGep32_2->mIdx1;
|
||||||
if ((exprIdx >= 0) && (exprIdx <= (int)argValues.size()))
|
if ((exprIdx >= 0) && (exprIdx <= (int)argValues.size()))
|
||||||
{
|
{
|
||||||
argValue = BfTypedValue(mModule->GetStringObjectValue(argValues[exprIdx].mExpression->ToString()),
|
auto expr = argValues[exprIdx].mExpression;
|
||||||
mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef));
|
if (expr != NULL)
|
||||||
|
{
|
||||||
|
argValue = BfTypedValue(mModule->GetStringObjectValue(expr->ToString()),
|
||||||
|
mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue