]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1732 : open of study with "Recover"
authormpv <mpv@opencascade.com>
Tue, 6 Sep 2016 12:19:43 +0000 (15:19 +0300)
committermpv <mpv@opencascade.com>
Tue, 6 Sep 2016 12:20:01 +0000 (15:20 +0300)
src/FeaturesPlugin/FeaturesPlugin_Recover.cpp

index 54f3bbdcf298de73d1520ff69abda5abdea6f0fc..59a2526ca7b1c359250c4ba782151abf9ec607cf 100644 (file)
@@ -59,9 +59,11 @@ void FeaturesPlugin_Recover::synchronizeRegistered()
       if (myRegistered.find(anObj) == myRegistered.end()) {
         // not found, so register a new
         ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
-        ModelAPI_Session::get()->validators()->registerUnconcealment(
-          aRes, aNewPersistent ? FeaturePtr() : aBase);
-        myRegistered.insert(anObj);
+        if (aRes.get()) { // this may be on first update after "open"
+          ModelAPI_Session::get()->validators()->registerUnconcealment(
+            aRes, aNewPersistent ? FeaturePtr() : aBase);
+          myRegistered.insert(anObj);
+        }
       }
     }
   }