From 27a1dc566b3fbc294fc761f7939a6dec51ecdeb3 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 5 Aug 2013 10:58:04 +0000 Subject: [PATCH] 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 ); --- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ) -- 2.39.2