mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-03 22:15:37 +05:00
add check of predicate pointer before usage
This commit is contained in:
parent
febe54fee1
commit
5f87b237ea
@ -1784,6 +1784,7 @@ GetElementsId( Predicate_i* thePredicate,
|
|||||||
const SMDS_Mesh* theMesh,
|
const SMDS_Mesh* theMesh,
|
||||||
Controls::Filter::TIdSequence& theSequence )
|
Controls::Filter::TIdSequence& theSequence )
|
||||||
{
|
{
|
||||||
|
if (thePredicate)
|
||||||
Controls::Filter::GetElementsId(theMesh,thePredicate->GetPredicate(),theSequence);
|
Controls::Filter::GetElementsId(theMesh,thePredicate->GetPredicate(),theSequence);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1793,6 +1794,7 @@ GetElementsId( Predicate_i* thePredicate,
|
|||||||
SMESH_Mesh_ptr theMesh,
|
SMESH_Mesh_ptr theMesh,
|
||||||
Controls::Filter::TIdSequence& theSequence )
|
Controls::Filter::TIdSequence& theSequence )
|
||||||
{
|
{
|
||||||
|
if (thePredicate)
|
||||||
if(const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(theMesh))
|
if(const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(theMesh))
|
||||||
Controls::Filter::GetElementsId(aMesh,thePredicate->GetPredicate(),theSequence);
|
Controls::Filter::GetElementsId(aMesh,thePredicate->GetPredicate(),theSequence);
|
||||||
}
|
}
|
||||||
@ -1802,7 +1804,7 @@ Filter_i::
|
|||||||
GetElementsId( SMESH_Mesh_ptr theMesh )
|
GetElementsId( SMESH_Mesh_ptr theMesh )
|
||||||
{
|
{
|
||||||
SMESH::long_array_var anArray = new SMESH::long_array;
|
SMESH::long_array_var anArray = new SMESH::long_array;
|
||||||
if(!CORBA::is_nil(theMesh)){
|
if(!CORBA::is_nil(theMesh) && myPredicate){
|
||||||
Controls::Filter::TIdSequence aSequence;
|
Controls::Filter::TIdSequence aSequence;
|
||||||
GetElementsId(myPredicate,theMesh,aSequence);
|
GetElementsId(myPredicate,theMesh,aSequence);
|
||||||
long i = 0, iEnd = aSequence.size();
|
long i = 0, iEnd = aSequence.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user