fixing some NULL return checks
This commit is contained in:
parent
2844f261f9
commit
574f4bb175
|
@ -3257,13 +3257,14 @@ ReturnObject *interpretAssignmentStmtNode(StmtNode *node,
|
||||||
{
|
{
|
||||||
AssignmentStmtNode *stmt = (AssignmentStmtNode *)node->stmt;
|
AssignmentStmtNode *stmt = (AssignmentStmtNode *)node->stmt;
|
||||||
ValueObject *val = interpretExprNode(stmt->expr, scope);
|
ValueObject *val = interpretExprNode(stmt->expr, scope);
|
||||||
|
if (!val) return NULL;
|
||||||
/* interpolate assigned strings */
|
/* interpolate assigned strings */
|
||||||
if (val->type == VT_STRING) {
|
if (val->type == VT_STRING) {
|
||||||
ValueObject *use = castStringImplicit(val, scope);
|
ValueObject *use = castStringImplicit(val, scope);
|
||||||
deleteValueObject(val);
|
deleteValueObject(val);
|
||||||
|
if (!use) return NULL;
|
||||||
val = use;
|
val = use;
|
||||||
}
|
}
|
||||||
if (!val) return NULL;
|
|
||||||
if (!updateScopeValue(scope, scope, stmt->target, val)) {
|
if (!updateScopeValue(scope, scope, stmt->target, val)) {
|
||||||
deleteValueObject(val);
|
deleteValueObject(val);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue