summaryrefslogtreecommitdiffstats
path: root/src/conn-avoid-ref.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-07-19 10:27:50 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-07-27 12:01:35 +0000
commit3c249f237eeac2a5d32ccd8b598675a3b28846d0 (patch)
treeca95a93c4ff53ca3b023da09ec531af9e2699a3e /src/conn-avoid-ref.cpp
parentMerge branch 'lpe-strings' of https://gitlab.com/Moini/inkscape (diff)
downloadinkscape-3c249f237eeac2a5d32ccd8b598675a3b28846d0.tar.gz
inkscape-3c249f237eeac2a5d32ccd8b598675a3b28846d0.zip
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
Diffstat (limited to 'src/conn-avoid-ref.cpp')
-rw-r--r--src/conn-avoid-ref.cpp7
1 files changed, 4 insertions, 3 deletions
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;