PAL10324. Fix MakePartition() for the case theMaterials.length() == 0

This commit is contained in:
eap 2006-06-26 14:50:06 +00:00
parent 5c45790bd4
commit 8e12e2d082

View File

@ -154,9 +154,11 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
//Get the materials //Get the materials
aLen = theMaterials.length(); aLen = theMaterials.length();
aMaterials = new TColStd_HArray1OfInteger (1, aLen); if ( aLen ) {
for (ind = 0; ind < aLen; ind++) { aMaterials = new TColStd_HArray1OfInteger (1, aLen);
aMaterials->SetValue(ind+1, theMaterials[ind]); for (ind = 0; ind < aLen; ind++) {
aMaterials->SetValue(ind+1, theMaterials[ind]);
}
} }
// Make Partition // Make Partition