Don't blow up when the pending point doesn't seem to exist; that
happens if we're solving an earlier group than the one that contains the pending point. [git-p4: depot-paths = "//depot/solvespace/": change = 1701]
This commit is contained in:
parent
f1c5d07e39
commit
b7e8b99f37
30
system.cpp
30
system.cpp
|
@ -87,19 +87,23 @@ void System::SortBySensitivity(void) {
|
||||||
mat.permutation[j] = j;
|
mat.permutation[j] = j;
|
||||||
}
|
}
|
||||||
if(SS.GW.pendingPoint.v) {
|
if(SS.GW.pendingPoint.v) {
|
||||||
Entity *p = SS.GetEntity(SS.GW.pendingPoint);
|
Entity *p = SS.entity.FindByIdNoOops(SS.GW.pendingPoint);
|
||||||
switch(p->type) {
|
// If we're solving an earlier group, then the pending point might
|
||||||
case Entity::POINT_IN_3D:
|
// not exist in the entity tables yet.
|
||||||
MarkAsDragged(p->param[0]);
|
if(p) {
|
||||||
MarkAsDragged(p->param[1]);
|
switch(p->type) {
|
||||||
MarkAsDragged(p->param[2]);
|
case Entity::POINT_XFRMD:
|
||||||
break;
|
case Entity::POINT_IN_3D:
|
||||||
case Entity::POINT_IN_2D:
|
MarkAsDragged(p->param[0]);
|
||||||
MarkAsDragged(p->param[0]);
|
MarkAsDragged(p->param[1]);
|
||||||
MarkAsDragged(p->param[1]);
|
MarkAsDragged(p->param[2]);
|
||||||
break;
|
break;
|
||||||
default: oops();
|
case Entity::POINT_IN_2D:
|
||||||
}
|
MarkAsDragged(p->param[0]);
|
||||||
|
MarkAsDragged(p->param[1]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qsort(mat.permutation, mat.n, sizeof(mat.permutation[0]), BySensitivity);
|
qsort(mat.permutation, mat.n, sizeof(mat.permutation[0]), BySensitivity);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user