From: eap Date: Tue, 14 Jun 2005 13:37:13 +0000 (+0000) Subject: PAL9165. prevent exception at access to non-initialized out parameters X-Git-Tag: V2_2_4b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=95203e4b8eb6329342e0cfb9766f7f132742cebe;p=modules%2Fgeom.git PAL9165. prevent exception at access to non-initialized out parameters --- diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.cc b/src/GEOM_I/GEOM_IInsertOperations_i.cc index 8585c7049..c4e4dc355 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.cc +++ b/src/GEOM_I/GEOM_IInsertOperations_i.cc @@ -136,10 +136,13 @@ void GEOM_IInsertOperations_i::ImportTranslators // Get sequences of available formats Handle(TColStd_HSequenceOfAsciiString) aFormats = new TColStd_HSequenceOfAsciiString; Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString; - if (!GetOperations()->ImportTranslators(aFormats, aPatterns)) return; + if (!GetOperations()->ImportTranslators(aFormats, aPatterns) || + aFormats->Length() != aPatterns->Length()) + { + aFormats->Clear(); aPatterns->Clear(); + } const int formSize = aFormats->Length(), pattSize = aPatterns->Length(); - if (formSize != pattSize) return; // allocate the CORBA arrays GEOM::string_array_var aFormatsArray = new GEOM::string_array();