fixing some NULL return checks

This commit is contained in:
Justin J. Meza 2016-03-27 14:03:39 -07:00
parent 2844f261f9
commit 574f4bb175
1 changed files with 2 additions and 1 deletions

View File

@ -3257,13 +3257,14 @@ ReturnObject *interpretAssignmentStmtNode(StmtNode *node,
{
AssignmentStmtNode *stmt = (AssignmentStmtNode *)node->stmt;
ValueObject *val = interpretExprNode(stmt->expr, scope);
if (!val) return NULL;
/* interpolate assigned strings */
if (val->type == VT_STRING) {
ValueObject *use = castStringImplicit(val, scope);
deleteValueObject(val);
if (!use) return NULL;
val = use;
}
if (!val) return NULL;
if (!updateScopeValue(scope, scope, stmt->target, val)) {
deleteValueObject(val);
return NULL;