Code

Filter effects dialog:
[inkscape.git] / src / connector-context.cpp
index 367917915a6565a40e59d73e6270115edb1fb21b..89d38bace98a69eba99ef7defd7291d058819917 100644 (file)
@@ -1145,12 +1145,14 @@ static void cc_set_active_shape(SPConnectorContext *cc, SPItem *item)
     }
 
 
-    NR::Rect bbox = sp_item_bbox_desktop(cc->active_shape);
-    NR::Point center = bbox.midpoint();
-    sp_knot_set_position(cc->connpthandle, &center, 0);
-
-    sp_knot_show(cc->connpthandle);
-
+    NR::Maybe<NR::Rect> bbox = sp_item_bbox_desktop(cc->active_shape);
+    if (bbox) {
+        NR::Point center = bbox->midpoint();
+        sp_knot_set_position(cc->connpthandle, &center, 0);
+        sp_knot_show(cc->connpthandle);
+    } else {
+        sp_knot_hide(cc->connpthandle);
+    }
 }