From ba897fbec79a81f3805c1f9e6e9e41b519fc4310 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 13 Feb 2018 15:53:08 +0300 Subject: [PATCH] Fix for the issue #2431 : SISGSEGV when launching some unit tests from GUI --- src/ModelHighAPI/ModelHighAPI_Tools.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index b8415681e..7d21ba70b 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -405,6 +405,8 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc, bool checkPythonDump() { SessionPtr aSession = ModelAPI_Session::get(); + // 2431: set PartSet as a current document + aSession->setActiveDocument(aSession->moduleDocument(), true); // dump all to the python file aSession->startOperation("Check python dump"); FeaturePtr aDump = aSession->moduleDocument()->addFeature("Dump"); -- 2.39.2