From: jfa Date: Tue, 7 Dec 2021 08:39:02 +0000 (+0300) Subject: [bos #26726] EDF 24466 - CheckAndImprove generates wrong result. Fix SIGSEGV on Check... X-Git-Tag: V9_9_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93082a7c8445b21ac5957dcead20046b2b703363;p=modules%2Fgeom.git [bos #26726] EDF 24466 - CheckAndImprove generates wrong result. Fix SIGSEGV on CheckCompoundOfBlocks failure. --- diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.cc b/src/GEOM_I/GEOM_IBlocksOperations_i.cc index 3e8d270f2..8a41e29c1 100644 --- a/src/GEOM_I/GEOM_IBlocksOperations_i.cc +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.cc @@ -626,16 +626,20 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks Handle(::GEOM_Object) aCompound = GetObjectImpl(theCompound); if (aCompound.IsNull()) return isComp; + GEOM::GEOM_IBlocksOperations::BCErrors_var anErrArray = + new GEOM::GEOM_IBlocksOperations::BCErrors(); + //Check std::list errList; isComp = GetOperations()->CheckCompoundOfBlocks (aCompound, theToleranceC1, errList); - if (!GetOperations()->IsDone()) + if (!GetOperations()->IsDone()) { + anErrArray->length(0); + theErrors = anErrArray._retn(); return isComp; + } const int nbErr = errList.size(); - GEOM::GEOM_IBlocksOperations::BCErrors_var anErrArray = - new GEOM::GEOM_IBlocksOperations::BCErrors(); anErrArray->length(nbErr); // fill the local CORBA array with values from lists