index f067aef5f85601ca55833f6f857fe7e964602afb..a15e17bc7c49fcda71a149a77d1ecfb814d1a986 100644 (file)
--- a/src/dialogs/unclump.cpp
+++ b/src/dialogs/unclump.cpp
return i->second;
}
- NR::Rect const r = item->getBounds(sp_item_i2d_affine(item));
- NR::Point const c = r.midpoint();
- c_cache[SP_OBJECT_ID(item)] = c;
- return c;
+ NR::Maybe<NR::Rect> r = item->getBounds(sp_item_i2d_affine(item));
+ if (r) {
+ NR::Point const c = r->midpoint();
+ c_cache[SP_OBJECT_ID(item)] = c;
+ return c;
+ } else {
+ // FIXME
+ return NR::Point(0, 0);
+ }
}
NR::Point
if ( i != wh_cache.end() ) {
wh = i->second;
} else {
- NR::Rect const r = item->getBounds(sp_item_i2d_affine(item));
- wh = r.dimensions();
- wh_cache[SP_OBJECT_ID(item)] = wh;
+ NR::Maybe<NR::Rect> r = item->getBounds(sp_item_i2d_affine(item));
+ if (r) {
+ wh = r->dimensions();
+ wh_cache[SP_OBJECT_ID(item)] = wh;
+ } else {
+ wh = NR::Point(0, 0);
+ }
}
return wh;