mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 07:52:03 +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
|
//Get the materials
|
||||||
aLen = theMaterials.length();
|
aLen = theMaterials.length();
|
||||||
aMaterials = new TColStd_HArray1OfInteger (1, aLen);
|
if ( aLen )
|
||||||
|
aMaterials = new TColStd_HArray1OfInteger (1, aLen);
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
aMaterials->SetValue(ind+1, theMaterials[ind]);
|
aMaterials->SetValue(ind+1, theMaterials[ind]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user