From 43a163739b4d3c740fd4a319b6d6c5815ee68f64 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 6 Sep 2016 15:19:43 +0300 Subject: [PATCH] Fix for the issue #1732 : open of study with "Recover" --- src/FeaturesPlugin/FeaturesPlugin_Recover.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); + } } } } -- 2.39.2