From 06b346c6b592e8a0d9609e42c5a509ee9ebe519b Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Sun, 4 Mar 2007 19:06:34 +0000 Subject: adapt code to new Maybe/bbox regime (bzr r2538) --- src/conn-avoid-ref.cpp | 8 +++++--- 1 file changed, 5 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 2a55d43b0..540e8205f 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -191,13 +191,15 @@ static Avoid::Polygn avoid_item_poly(SPItem const *item) // by the sp_*_update functions, e.g., text. sp_document_ensure_up_to_date(item->document); - NR::Rect rHull = item->getBounds(sp_item_i2doc_affine(item)); - + NR::Maybe rHull = item->getBounds(sp_item_i2doc_affine(item)); + if (!rHull) { + return Avoid::newPoly(0); + } double spacing = desktop->namedview->connector_spacing; // Add a little buffer around the edge of each object. - NR::Rect rExpandedHull = NR::expand(rHull, -spacing); + NR::Rect rExpandedHull = NR::expand(*rHull, -spacing); poly = Avoid::newPoly(4); for (unsigned n = 0; n < 4; ++n) { -- cgit v1.2.3