diff options
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/astexpression.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index b3cf5f2a51cc..7b5a0ca390c4 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -785,13 +785,14 @@ AstExprValue* AstExpression::coerce(ExprType t, sal_Bool bAssign) break; } + AstExprValue* const coerced(coerce_value(copy, t)); + if (!coerced) + delete copy; + if (bAssign) - { - m_exprValue = coerce_value(copy, t); - return m_exprValue; - } + m_exprValue = coerced; - return coerce_value(copy, t); + return coerced; } void AstExpression::evaluate(EvalKind ek) |