diff --git a/src/document-undo.cpp b/src/document-undo.cpp index cdde7d96ad11b3fdf06e31fa5c85d602fac28973..44c636df27713378244c2e05e49f303390b88102 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -205,7 +205,7 @@ void Inkscape::DocumentUndo::cancel(SPDocument *doc) g_assert (doc->sensitive); done(doc, "undozone", ""); // ensure tere is something to undo (extension crach can do nothing) - if (doc->undo.back()->description == "undozone") { + if (!doc->undo.empty() && doc->undo.back()->description == "undozone") { undo(doc); clearRedo(doc); } diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp index 60b7f0e3ea172619623f10230249509cd416f8a6..b23faba33f246e0a009adcf11d78c4a17614faae 100644 --- a/src/live_effects/lpe-fillet-chamfer.cpp +++ b/src/live_effects/lpe-fillet-chamfer.cpp @@ -338,8 +338,8 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem) } } if (pathv.size() > i && !pathv[i].closed()) { - nodesatellites[i][0].amount = 0; - nodesatellites[i][count_path_nodes(pathv[i]) - 1].amount = 0; + nodesatellites[i].front().amount = 0; + nodesatellites[i].back().amount = 0; } } if (!_pathvector_nodesatellites) {