From 7b9f9129ae112232db12ced01cd854d8c0655725 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 19 Jun 2020 15:31:08 +0300 Subject: [PATCH] Issue #19703: SIGSEGV when activating SHAPER on a hdf --- src/FeaturesPlugin/FeaturesPlugin_Translation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.39.2