From: eap Date: Thu, 17 Oct 2013 08:01:05 +0000 (+0000) Subject: ILMAB: Field on geometry X-Git-Tag: BR_hydro_v_0_3_1~84 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2f62ec8650b794dc8cb6cf168940e3b817f71e11;p=modules%2Fgeom.git ILMAB: Field on geometry Fix SetStringArray() which crashes SALOME if an input array of size 1 starts at 0. --- diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index af73ba3f6..a6bf5ec0a 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -555,9 +555,9 @@ void GEOM_Function::SetStringArray(int thePosition, const Handle(TColStd_HArray1 if(thePosition <= 0 || theArray.IsNull()) return; TDF_Label anArgLabel = ARGUMENT(thePosition); - Handle(TDataStd_ExtStringArray) anArray = new TDataStd_ExtStringArray; + Handle(TDataStd_ExtStringArray) anArray = + TDataStd_ExtStringArray::Set(anArgLabel, theArray->Lower(), theArray->Upper()); anArray->ChangeArray(theArray); - anArgLabel.AddAttribute(anArray); _isDone = true; }