From: mpv Date: Tue, 6 Sep 2016 12:19:43 +0000 (+0300) Subject: Fix for the issue #1732 : open of study with "Recover" X-Git-Tag: V_2.5.0~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43a163739b4d3c740fd4a319b6d6c5815ee68f64;p=modules%2Fshaper.git Fix for the issue #1732 : open of study with "Recover" --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Recover.cpp b/src/FeaturesPlugin/FeaturesPlugin_Recover.cpp index 54f3bbdcf..59a2526ca 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Recover.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Recover.cpp @@ -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(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); + } } } }