From: eap Date: Mon, 26 Jun 2006 14:50:06 +0000 (+0000) Subject: PAL10324. Fix MakePartition() for the case theMaterials.length() == 0 X-Git-Tag: T3_2_1_pre~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8e12e2d082dc7605efbf1ab3069086f9167e1092;p=modules%2Fgeom.git PAL10324. Fix MakePartition() for the case theMaterials.length() == 0 --- diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.cc b/src/GEOM_I/GEOM_IBooleanOperations_i.cc index bbcf768ff..56726b072 100644 --- a/src/GEOM_I/GEOM_IBooleanOperations_i.cc +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.cc @@ -154,9 +154,11 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition //Get the materials aLen = theMaterials.length(); - aMaterials = new TColStd_HArray1OfInteger (1, aLen); - for (ind = 0; ind < aLen; ind++) { - aMaterials->SetValue(ind+1, theMaterials[ind]); + if ( aLen ) { + aMaterials = new TColStd_HArray1OfInteger (1, aLen); + for (ind = 0; ind < aLen; ind++) { + aMaterials->SetValue(ind+1, theMaterials[ind]); + } } // Make Partition