From b4ebe1960f8443c465d020b96a7f6a3724165516 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 13 Apr 2020 09:25:27 +0300 Subject: [PATCH] Fix for the issue #3205 : SIGSEGV in Break link with branch occ/modificationByFeatures Store the old selection in groups and fields to use it in break link --- src/ModelAPI/ModelAPI_Tools.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index de4c97ccd..19b101865 100644 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -1105,11 +1105,15 @@ std::list referencedFeatures( std::shared_ptr singleEvolution(const std::string theEntry) { ResultPtr aRes; + if (theEntry.empty()) + return aRes; std::size_t aFirstColon = theEntry.find(":"); if (aFirstColon == std::string::npos) return aRes; // searching a part std::string aPartIdStr = theEntry.substr(0, aFirstColon); + if (aPartIdStr.size() > 1 && aPartIdStr[0] == 'd') + return aRes; int aPartId = std::stoi(aPartIdStr); SessionPtr aSession = ModelAPI_Session::get(); DocumentPtr aRoot = aSession->moduleDocument(); -- 2.39.2