diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-04 19:06:34 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-04 19:06:34 +0000 |
| commit | 06b346c6b592e8a0d9609e42c5a509ee9ebe519b (patch) | |
| tree | d11771089b02bc74843859851025824a6d8ac3b9 /src/conn-avoid-ref.cpp | |
| parent | replace use of invokeBbox in flood fill tool (diff) | |
| download | inkscape-06b346c6b592e8a0d9609e42c5a509ee9ebe519b.tar.gz inkscape-06b346c6b592e8a0d9609e42c5a509ee9ebe519b.zip | |
adapt code to new Maybe/bbox regime
(bzr r2538)
Diffstat (limited to 'src/conn-avoid-ref.cpp')
| -rw-r--r-- | src/conn-avoid-ref.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<NR::Rect> 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) { |
