From 83c2470ce95d95a65c4a9a9f4604af2d0a5a5daa Mon Sep 17 00:00:00 2001 From: Subject38 Date: Sun, 31 Mar 2024 10:26:48 -0500 Subject: [PATCH] Fix crash bug in move_handle.rs (#398) --- src/tool_behaviors/move_handle.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_behaviors/move_handle.rs b/src/tool_behaviors/move_handle.rs index 8c6cee9..5733ec3 100644 --- a/src/tool_behaviors/move_handle.rs +++ b/src/tool_behaviors/move_handle.rs @@ -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; }