summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/selection.cpp')
-rw-r--r--src/selection.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/selection.cpp b/src/selection.cpp
index 82c82b523..5c60e5f41 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -354,7 +354,13 @@ NRRect *Selection::boundsInDocument(NRRect *bbox) const {
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 */