From: azv Date: Fri, 19 Jun 2020 12:31:08 +0000 (+0300) Subject: Issue #19703: SIGSEGV when activating SHAPER on a hdf X-Git-Tag: V9_5_0rc2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b9f9129ae112232db12ced01cd854d8c0655725;p=modules%2Fshaper.git Issue #19703: SIGSEGV when activating SHAPER on a hdf --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp b/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp index d6554ef3c..4aae2edb1 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp @@ -177,8 +177,11 @@ GeomTrsfPtr FeaturesPlugin_Translation::translationByTwoPoints() } } - GeomTrsfPtr aTrsf(new GeomAPI_Trsf); - aTrsf->setTranslation(aFirstPoint, aSecondPoint); + GeomTrsfPtr aTrsf; + if (aFirstPoint && aSecondPoint) { + aTrsf.reset(new GeomAPI_Trsf); + aTrsf->setTranslation(aFirstPoint, aSecondPoint); + } return aTrsf; }