Prevent SIGSEGV

if ( !anActor ) anActor = SMESH::CreateActor( aMeshSObj->GetStudy(), aMeshSObj->GetID().c_str(), true );
+            if ( anActor ) // actor is not created for an empty mesh
+            {
+              anActor->SetEntityMode( entities );
This commit is contained in:
eap 2013-08-05 10:58:04 +00:00
parent 6399cfb3c4
commit 27a1dc566b

View File

@ -906,10 +906,11 @@ void SMESHGUI_BaseComputeOp::computeMesh()
#endif #endif
SMESH_Actor *anActor = SMESH::FindActorByObject( myMesh ); SMESH_Actor *anActor = SMESH::FindActorByObject( myMesh );
if ( !anActor ) anActor = SMESH::CreateActor( aMeshSObj->GetStudy(), aMeshSObj->GetID().c_str(), true ); if ( !anActor ) anActor = SMESH::CreateActor( aMeshSObj->GetStudy(), aMeshSObj->GetID().c_str(), true );
if ( anActor ) // actor is not created for an empty mesh
{
anActor->SetEntityMode( entities ); anActor->SetEntityMode( entities );
SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor );
}
SMESH::Update(myIObject, true); SMESH::Update(myIObject, true);
if ( limitExceeded ) if ( limitExceeded )