+ fixes #0002372: Application terminates on attempt to change external geometry from a sketch

+ fixes #0002373: When Measuring in the distance between two external geometry Freecad crashes
This commit is contained in:
wmayer 2015-12-25 09:47:25 +01:00
parent 9aa3cfb4f9
commit 632eaeadeb

View File

@ -3369,6 +3369,15 @@ int System::diagnose(Algorithm alg)
return dofs;
}
// When adding an external geometry or a constraint on an external geometry the array 'plist' is empty.
// So, we must abort here because otherwise we would create an invalid matrix and make the application
// eventually crash. This fixes issues #0002372/#0002373.
if (plist.empty()) {
hasDiagnosis = true;
dofs = plist.size();
return dofs;
}
redundant.clear();
conflictingTags.clear();
redundantTags.clear();