From 8152a78a4abccec6db058d808019b6ad1e84a2fa Mon Sep 17 00:00:00 2001 From: Antoine ELIAS Date: Tue, 19 May 2015 13:56:43 +0200 Subject: [PATCH] fix bug on cell extraction Change-Id: I2b5b98181d772043ef5309178809eefd6bc2b5ad --- scilab/modules/ast/src/cpp/ast/run_CallExp.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp b/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp index 1708b62..4592940 100644 --- a/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp +++ b/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp @@ -349,14 +349,18 @@ void RunVisitorT::visitprivate(const CellCallExp &e) if (pList->getSize() == 1) { - setResult(pList->get(0)); + InternalType* ret = pList->get(0); + setResult(ret); + + ret->IncreaseRef(); + pList->killMe(); + ret->DecreaseRef(); } else { setResult(pList); } - pList->killMe(); //clean pArgs return by GetArgumentList for (int iArg = 0 ; iArg < (int)pArgs->size() ; iArg++) -- 1.7.9.5