]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #19703: SIGSEGV when activating SHAPER on a hdf
authorazv <artem.zhidkov@opencascade.com>
Fri, 19 Jun 2020 12:31:08 +0000 (15:31 +0300)
committerazv <artem.zhidkov@opencascade.com>
Fri, 19 Jun 2020 12:31:08 +0000 (15:31 +0300)
src/FeaturesPlugin/FeaturesPlugin_Translation.cpp

index d6554ef3ca15e99fb1001c09d2ce3dfac49f5525..4aae2edb186d0bc299e08475056683af57bbb0f7 100644 (file)
@@ -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;
 }