Skip to content

Commit

Permalink
Fix crash when dragging an image and toggling on crop mode
Browse files Browse the repository at this point in the history
`crop_mode_event_start` would be set to `None` and thus crash the program. Add a check for this.
  • Loading branch information
DarkDefender authored and rbreu committed Jun 2, 2024
1 parent ef8189e commit e804766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beeref/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e804766

Please sign in to comment.