From: ptv Date: Thu, 22 Jun 2006 10:53:50 +0000 (+0000) Subject: add check before array declaration X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c420fe5dcc92a8b8d0d06c407507c0f757ed428e;p=modules%2Fgeom.git add check before array declaration --- diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.cc b/src/GEOM_I/GEOM_IBooleanOperations_i.cc index bbcf768ff..0af96885c 100644 --- a/src/GEOM_I/GEOM_IBooleanOperations_i.cc +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.cc @@ -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]); }