From: mpv Date: Tue, 13 Feb 2018 12:53:08 +0000 (+0300) Subject: Fix for the issue #2431 : SISGSEGV when launching some unit tests from GUI X-Git-Tag: V_3.0.0~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba897fbec79a81f3805c1f9e6e9e41b519fc4310;p=modules%2Fshaper.git Fix for the issue #2431 : SISGSEGV when launching some unit tests from GUI --- 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");