Skip to content

Commit

Permalink
Fix a crash when extruding TTF text.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evil-Spirit authored and whitequark committed Nov 21, 2016
1 parent 4362954 commit aaab8a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -824,6 +828,7 @@ void EntityBase::GenerateEquations(IdList<Equation,hEquation> *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);
Expand Down

0 comments on commit aaab8a0

Please sign in to comment.