From aaab8a09d4eb249bef47d95aede808278ed5d489 Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Mon, 21 Nov 2016 21:37:35 +0700 Subject: [PATCH] Fix a crash when extruding TTF text. --- src/entity.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entity.cpp b/src/entity.cpp index ea71806..462cce6 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -568,6 +568,10 @@ void EntityBase::PointGetExprsInWorkplane(hEntity wrkpl, Expr **u, Expr **v) con } ExprVector EntityBase::PointGetExprsInWorkplane(hEntity wrkpl) const { + if(wrkpl.v == Entity::FREE_IN_3D.v) { + return PointGetExprs(); + } + ExprVector r; PointGetExprsInWorkplane(wrkpl, &r.x, &r.y); r.z = Expr::From(0.0); @@ -824,6 +828,7 @@ void EntityBase::GenerateEquations(IdList *l) const { } case Type::TTF_TEXT: { + if(SK.GetEntity(point[0])->type != Type::POINT_IN_2D) break; EntityBase *b = SK.GetEntity(point[2]); EntityBase *c = SK.GetEntity(point[3]); ExprVector eb = b->PointGetExprsInWorkplane(workplane);