[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 f03bd3d157
commit 6c6790e8b5

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;
}