diff --git a/src/interface.cpp b/src/interface.cpp
index 83f4ac3c8ffdc6708a4deb26e44a06be23fcebd0..dad1146c04d5ec94abd94e184bceff13c0c2bd1b 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
int const saved_pref = prefs_get_int_attribute("options.transform", "pattern", 1);
prefs_set_int_attribute("options.transform", "pattern", 1);
sp_document_ensure_up_to_date(sp_desktop_document(desktop));
- NR::Point m( desktop->point() - selection->bounds().midpoint() );
- sp_selection_move_relative(selection, m);
+ NR::Maybe<NR::Rect> sel_bbox = selection->bounds();
+ if (sel_bbox) {
+ NR::Point m( desktop->point() - sel_bbox->midpoint() );
+ sp_selection_move_relative(selection, m);
+ }
prefs_set_int_attribute("options.transform", "pattern", saved_pref);
}