]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
PAL9165. prevent exception at access to non-initialized out parameters
authoreap <eap@opencascade.com>
Wed, 15 Jun 2005 05:58:02 +0000 (05:58 +0000)
committereap <eap@opencascade.com>
Wed, 15 Jun 2005 05:58:02 +0000 (05:58 +0000)
src/GEOM_I/GEOM_IInsertOperations_i.cc

index 8585c704953babf1e905e2c0e61a532a525868cc..c4e4dc355ce9a175e9a0a10ecbee8797e8d3a77e 100644 (file)
@@ -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();