mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
PixelPaint: Fix crash on mouse moves
This pr fixes a problem where the application would crash if the mouse was moved while the editor was still loading the image. With this change tool related mouse move events are discarded as long as there is no active tool.
This commit is contained in:
parent
d462d6280a
commit
c74e2d04d1
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/Torstennator Commit: https://github.com/SerenityOS/serenity/commit/c74e2d04d1 Pull-request: https://github.com/SerenityOS/serenity/pull/22256
1 changed files with 3 additions and 0 deletions
|
@ -430,6 +430,9 @@ void ImageEditor::mousemove_event(GUI::MouseEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (active_tool() == nullptr)
|
||||
return;
|
||||
|
||||
auto image_event = event_with_pan_and_scale_applied(event);
|
||||
if (on_image_mouse_position_change) {
|
||||
on_image_mouse_position_change(image_event.position());
|
||||
|
|
Loading…
Add table
Reference in a new issue