Fix a crash after creating a constraint.

To reproduce, e.g.:
  * draw a rect;
  * translate the rect;
  * add a pt-on-line constraint between two instances.
pull/168/head
EvilSpirit 2017-01-14 18:53:07 +07:00 committed by whitequark
parent 8d0e226722
commit 3e668079b5
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ hConstraint Constraint::AddConstraint(Constraint *c, bool rememberForUndo) {
if(rememberForUndo) SS.UndoRemember(); if(rememberForUndo) SS.UndoRemember();
SK.constraint.AddAndAssignId(c); SK.constraint.AddAndAssignId(c);
c->Generate(&SK.param);
SS.MarkGroupDirty(c->group); SS.MarkGroupDirty(c->group);
SK.GetGroup(c->group)->dofCheckOk = false; SK.GetGroup(c->group)->dofCheckOk = false;