diff options
Diffstat (limited to 'src/connector-context.cpp')
| -rw-r--r-- | src/connector-context.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 367917915..89d38bace 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -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, ¢er, 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, ¢er, 0); + sp_knot_show(cc->connpthandle); + } else { + sp_knot_hide(cc->connpthandle); + } } |
