From: srn Date: Thu, 30 Mar 2006 05:55:44 +0000 (+0000) Subject: BugID: IPAL12035, added a check whether an restored entry corresponds to a real objec... X-Git-Tag: mergeto_OCC_debug_for_3_2_0b1_07Apr06~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fe7e4e5aa231a5136c3d4fddd2de3e5cfc5854a6;p=modules%2Fvisu.git BugID: IPAL12035, added a check whether an restored entry corresponds to a real object in the Study --- diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index e5b5b060..f1dd5652 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -1840,6 +1840,11 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint) // entry is a normal entry - it should be "decoded" (setting base adress of component) QString entry( ip->decodeEntry( *entIt ).c_str() ); + //SRN: Added a check that the entry corresponds to Standard_Real object in the Study + // as the object may be deleted or modified after the visual state is saved. + _PTR(SObject) so = studyDS->FindObjectID(entry.latin1()); + if(!so) continue; //Skip the not existent entry + for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) { std::string viewerType = ::getParam( *namesIt, ViewerType );