From 927fdc9edc0e86d6a01b3ca6e269a2f24e493f08 Mon Sep 17 00:00:00 2001 From: Benjamin Nauck Date: Sat, 9 Jan 2021 04:30:28 +0100 Subject: [PATCH] [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. --- src/Mod/Sketcher/App/SketchObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 37e81f3b13..d4f34362de 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -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; }