index 25466a4a4d5de6daf4af48c497801f7ca039737a..7c85277768d7e87581e4d118f01b00091f030ec2 100644 (file)
--- a/src/sp-conn-end-pair.cpp
+++ b/src/sp-conn-end-pair.cpp
for (unsigned h = 0; h < 2; ++h) {
if ( h2attItem[h] ) {
- NR::Rect const bbox = h2attItem[h]->getBounds(sp_item_i2doc_affine(h2attItem[h]));
- endPts[h] = bbox.midpoint();
+ NR::Maybe<NR::Rect> bbox = h2attItem[h]->getBounds(sp_item_i2doc_affine(h2attItem[h]));
+ if (bbox) {
+ endPts[h] = bbox->midpoint();
+ } else {
+ // FIXME
+ endPts[h] = NR::Point(0, 0);
+ }
}
else
{