mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 01:32:05 +05:00
add check before array declaration
This commit is contained in:
parent
a6c120d5d8
commit
c420fe5dcc
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user