From 5e628aedf18f72ba2395c265190dbee37352ffbf Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 9 Dec 2013 13:41:38 +0100 Subject: [PATCH] + fixes #0001327: Crash in System::initSolution() --- src/Mod/Sketcher/App/freegcs/GCS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/freegcs/GCS.cpp b/src/Mod/Sketcher/App/freegcs/GCS.cpp index a24aa0cca0..5f8ea18501 100644 --- a/src/Mod/Sketcher/App/freegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/freegcs/GCS.cpp @@ -748,7 +748,9 @@ void System::initSolution() } VEC_I components(boost::num_vertices(g)); - int componentsSize = boost::connected_components(g, &components[0]); + int componentsSize = 0; + if (!components.empty()) + componentsSize = boost::connected_components(g, &components[0]); // identification of equality constraints and parameter reduction std::set reducedConstrs; // constraints that will be eliminated through reduction