Salome HOME
Issue #19703: SIGSEGV when activating SHAPER on a hdf
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.cpp
index c2adb34a5157f11c844a373c87d9f081d0ad147e..37695957df3b59afc4133ca34f8c025ccc7895cd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -178,7 +178,9 @@ GeomTrsfPtr FeaturesPlugin_Translation::translationByTwoPoints()
   }
 
   GeomTrsfPtr aTrsf(new GeomAPI_Trsf);
-  aTrsf->setTranslation(aFirstPoint, aSecondPoint);
+  if (aFirstPoint && aSecondPoint) {
+    aTrsf->setTranslation(aFirstPoint, aSecondPoint);
+  }
   return aTrsf;
 }