From: eap Date: Mon, 5 Aug 2013 10:58:04 +0000 (+0000) Subject: Prevent SIGSEGV X-Git-Tag: V7_3_0a1~230 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27a1dc566b3fbc294fc761f7939a6dec51ecdeb3;p=modules%2Fsmesh.git 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 ); --- diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 0415094f1..26180bedb 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -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 )