From: bri Date: Fri, 8 Feb 2013 11:00:16 +0000 (+0000) Subject: MPV: Fix for crash if there is no Geometrical component created in the study X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_siman_phase1;p=modules%2Fgeom.git MPV: Fix for crash if there is no Geometrical component created in the study --- diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index e58b79a90..8f04a5ffc 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -2630,6 +2630,8 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId) SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject ); SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId ); SALOMEDS::SComponent_var aComponent = aStudy->FindComponent("GEOM"); + if (CORBA::is_nil(aComponent)) + return aResult._retn(); SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(aComponent); // check only published shapes TopoDS_Compound aResultComp; BRep_Builder aBB;