]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
add check before array declaration
authorptv <ptv@opencascade.com>
Thu, 22 Jun 2006 10:53:50 +0000 (10:53 +0000)
committerptv <ptv@opencascade.com>
Thu, 22 Jun 2006 10:53:50 +0000 (10:53 +0000)
src/GEOM_I/GEOM_IBooleanOperations_i.cc

index bbcf768ff8f7c50c6200a8390e1217822c487e84..0af96885cc6885aca9858037d998fb1ed590b547 100644 (file)
@@ -154,7 +154,8 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
 
   //Get the materials
   aLen = theMaterials.length();
-  aMaterials = new TColStd_HArray1OfInteger (1, aLen);
+  if ( aLen )
+    aMaterials = new TColStd_HArray1OfInteger (1, aLen);
   for (ind = 0; ind < aLen; ind++) {
     aMaterials->SetValue(ind+1, theMaterials[ind]);
   }