Salome HOME
Prevent SIGSEGV
authoreap <eap@opencascade.com>
Mon, 5 Aug 2013 10:58:04 +0000 (10:58 +0000)
committereap <eap@opencascade.com>
Mon, 5 Aug 2013 10:58:04 +0000 (10:58 +0000)
             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 );

src/SMESHGUI/SMESHGUI_ComputeDlg.cxx

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