Skip to content

Commit

Permalink
+ fixes #2372: Application terminates on attempt to change external g…
Browse files Browse the repository at this point in the history
…eometry from a sketch

+ fixes #2373: When Measuring in the distance between two external geometry Freecad crashes
  • Loading branch information
wwmayer committed Dec 25, 2015
1 parent 9aa3cfb commit 632eaea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Mod/Sketcher/App/planegcs/GCS.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 632eaea

Please sign in to comment.