Skip to content

Commit

Permalink
Fix possible nil crash
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Aug 5, 2024
1 parent 777c6c8 commit bc505dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/x11/win/frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func (f *frame) mouseMotion(x, y int16) {
relX := x - f.x
relY := y - f.y

if uint16(relX) > f.width-f.topRightPixelWidth() {
if uint16(relX) > f.width-f.topRightPixelWidth() && f.canvas != nil {
relX = int16(f.canvas.Content().Size().Width*f.canvas.Scale()) - (int16(f.width) - relX)
}

Expand Down

0 comments on commit bc505dd

Please sign in to comment.