From fe7e4e5aa231a5136c3d4fddd2de3e5cfc5854a6 Mon Sep 17 00:00:00 2001 From: srn Date: Thu, 30 Mar 2006 05:55:44 +0000 Subject: [PATCH] BugID: IPAL12035, added a check whether an restored entry corresponds to a real object in the Study --- src/VISUGUI/VisuGUI_Module.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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 ); -- 2.39.2