From 3331817489feee7556c099374f343e073b5306a6 Mon Sep 17 00:00:00 2001 From: bri Date: Fri, 8 Feb 2013 11:00:16 +0000 Subject: [PATCH] MPV: Fix for crash if there is no Geometrical component created in the study --- src/GEOM_I/GEOM_Gen_i.cc | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2