From 3c249f237eeac2a5d32ccd8b598675a3b28846d0 Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Fri, 19 Jul 2019 20:27:50 +1000 Subject: Crashfix for connectors avoid selected items Handle cases where selected item has no points. E.g. Text (grouped) or symbols Address gitlab.com/inkscape/inbox/issues/643 --- src/conn-avoid-ref.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/conn-avoid-ref.cpp') diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index e571debbf..4723d142b 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -121,10 +121,8 @@ void SPAvoidRef::handleSettingChange() shapeRef = new Avoid::ShapeRef(router, poly, itemID); } } - else + else if (shapeRef) { - g_assert(shapeRef); - router->deleteShape(shapeRef); shapeRef = nullptr; } @@ -284,6 +282,9 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item) // enlarge path by "desktop->namedview->connector_spacing" // store expanded convex hull in Avoid::Polygn Avoid::Polygon poly; + if (hull.empty()) { + return poly; + } Geom::Line hull_edge(hull.back(), hull.front()); Geom::Line prev_parallel_hull_edge; -- cgit v1.2.3