diff --git a/src/selection.cpp b/src/selection.cpp
index 82c82b5232c8053dd4eba0f5a0615580b8a0b636..5c60e5f41e76652079dab454d900d697e5583815 100644 (file)
--- a/src/selection.cpp
+++ b/src/selection.cpp
NR::Rect Selection::boundsInDocument() const {
NRRect r;
- return NR::Rect(*boundsInDocument(&r));
+ NR::Maybe<NR::Rect> rect(boundsInDocument(&r)->upgrade());
+ if (rect) {
+ return *rect;
+ } else {
+ // FIXME
+ return NR::Rect(NR::Point(0, 0), NR::Point(0, 0));
+ }
}
/** Extract the position of the center from the first selected object */