]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
MPV: Fix for crash if there is no Geometrical component created in the study BR_siman_phase1
authorbri <bri@opencascade.com>
Fri, 8 Feb 2013 11:00:16 +0000 (11:00 +0000)
committerbri <bri@opencascade.com>
Fri, 8 Feb 2013 11:00:16 +0000 (11:00 +0000)
src/GEOM_I/GEOM_Gen_i.cc

index e58b79a9051ed0c553c79f61aa92b47b002939eb..8f04a5ffc0daf805b0652695ea9cbd869b8dc028 100644 (file)
@@ -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;