Fix crash on deleting all subpaths (#1460)

* Fix crash on deleting all subpaths

* Delete layer if no manipulators exist
This commit is contained in:
0HyperCube
2023-11-16 15:42:21 -08:00
committed by GitHub
parent de235e3be1
commit 8a816cd701
3 changed files with 13 additions and 0 deletions
+3
View File
@@ -51,6 +51,9 @@ impl<ManipulatorGroupId: crate::Identifier> Iterator for SubpathIter<'_, Manipul
// Returns the Bezier representation of each `Subpath` segment, defined between a pair of adjacent manipulator points.
fn next(&mut self) -> Option<Self::Item> {
if self.subpath.is_empty() {
return None;
}
let len = self.subpath.len() - 1
+ match self.subpath.closed {
true => 1,