From: mpv Date: Mon, 13 Apr 2020 06:25:27 +0000 (+0300) Subject: Fix for the issue #3205 : SIGSEGV in Break link with branch occ/modificationByFeatures X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4ebe1960f8443c465d020b96a7f6a3724165516;p=modules%2Fshaper.git 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 --- 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();