Skip to content

Commit

Permalink
Fix crash bug in move_handle.rs (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
Subject38 authored Mar 31, 2024
1 parent 8e73c49 commit 83c2470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tool_behaviors/move_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl MoveHandle {
follow = Follow::ForceLine;
}

if point.get_handle(self.wh.opposite()).unwrap() == Handle::Colocated && follow == Follow::ForceLine {
if point.get_handle(self.wh.opposite()).is_some_and(|wh| wh == Handle::Colocated) && follow == Follow::ForceLine {
// If the opposite handle is colocated, force line crashes due to unwrapping a None value.
follow = Follow::No;
}
Expand Down

0 comments on commit 83c2470

Please sign in to comment.