]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix a bug with persistence. mergeto_V7_main_11Feb13
authorana <ana@opencascade.com>
Thu, 31 Jan 2013 15:43:04 +0000 (15:43 +0000)
committerana <ana@opencascade.com>
Thu, 31 Jan 2013 15:43:04 +0000 (15:43 +0000)
src/VISU_I/VISU_Result_i.cc

index 4ef802f8feae0776132df1f738b198f4b077715d..f50496a560fb575903fca1af4280c4143e12f58d 100644 (file)
@@ -779,6 +779,7 @@ VISU::Result_i
 {
   if(MYDEBUG) MESSAGE("Result_i::Restore - " << thePrefix);
   mySObject = SALOMEDS::SObject::_duplicate(theSObject);
+  mySObject->Register(); // Increment reference counter to stored SObject
   mySComponent = mySObject->GetFatherComponent();
   myStudyDocument = theSObject->GetStudy();
   myStudy = VISU::GetStudy(myStudyDocument);