[Sketcher] Fix crash in SketcherObject::setDatum

The variable newVals can't be used after std::move, fetch it from the
constraint it if an error occurs.
This commit is contained in:
Benjamin Nauck
2021-01-09 04:30:28 +01:00
committed by abdullahtahiriyo
parent 1851ddd933
commit 927fdc9edc

View File

@@ -362,7 +362,7 @@ int SketchObject::setDatum(int ConstrId, double Datum)
int err = solve();
if (err)
newVals[ConstrId]->setValue(oldDatum);
this->Constraints.getValues()[ConstrId]->setValue(oldDatum); // newVals is a shell now
return err;
}