diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index 0dd3b4f316168bfb3dbb31c05d8000e8699985d8..e20f73f417799847858cbb454504146f04099b26 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -304,10 +304,12 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P std::vector to_select; SPDocument *doc = item->document; sp_item_list_to_curves (items, selected, to_select); - SPObject* newObj = doc->getObjectByRepr(to_select[0]); - item = cast(newObj); - g_assert(item != nullptr); - selection->add(item); + if (!to_select.empty()) { + SPObject *newObj = doc->getObjectByRepr(to_select[0]); + item = cast(newObj); + g_assert(item != nullptr); + selection->add(item); + } } if (is(item) && !is(item)) {