From e08635b1e884eb293445e6543393adebdae70ff5 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 14 Feb 2014 15:02:26 +0100 Subject: [PATCH] + fixes #0001413: Part.Shape.transformGeometry on Null Shape causes SIGSEGV --- src/Mod/Part/App/TopoShape.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 01ba36afe..dc577d571 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1913,6 +1913,9 @@ void TopoShape::transformGeometry(const Base::Matrix4D &rclMat) TopoDS_Shape TopoShape::transformGShape(const Base::Matrix4D& rclTrf) const { + if (this->_Shape.IsNull()) + Standard_Failure::Raise("Cannot transform null shape"); + gp_GTrsf mat; mat.SetValue(1,1,rclTrf[0][0]); mat.SetValue(2,1,rclTrf[1][0]); @@ -1934,6 +1937,9 @@ TopoDS_Shape TopoShape::transformGShape(const Base::Matrix4D& rclTrf) const void TopoShape::transformShape(const Base::Matrix4D& rclTrf, bool copy) { + if (this->_Shape.IsNull()) + Standard_Failure::Raise("Cannot transform null shape"); + gp_Trsf mat; mat.SetValues(rclTrf[0][0],rclTrf[0][1],rclTrf[0][2],rclTrf[0][3], rclTrf[1][0],rclTrf[1][1],rclTrf[1][2],rclTrf[1][3],