From e804766dc4858c44a0bd2023fa9153a12d73b4ad Mon Sep 17 00:00:00 2001 From: DarkDefender Date: Thu, 30 May 2024 16:57:28 +0200 Subject: [PATCH] Fix crash when dragging an image and toggling on crop mode `crop_mode_event_start` would be set to `None` and thus crash the program. Add a check for this. --- beeref/items.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beeref/items.py b/beeref/items.py index 238b9ef..c42044a 100644 --- a/beeref/items.py +++ b/beeref/items.py @@ -584,7 +584,7 @@ def ensure_point_within_crop_bounds(self, point, handle): return point def mouseMoveEvent(self, event): - if self.crop_mode: + if self.crop_mode and self.crop_mode_event_start: diff = event.pos() - self.crop_mode_event_start if self.crop_mode_move == self.crop_handle_topleft: new = self.ensure_point_within_crop_bounds(