mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-29 09:23:32 +00:00
Handle null target in DragEvent (fix #4824)
This commit is contained in:
parent
ae9e3583a4
commit
58326b1508
@ -20,7 +20,8 @@ namespace ui {
|
||||
public:
|
||||
DragEvent(Component* source, ui::Widget* target, os::DragEvent& ev)
|
||||
: Event(source)
|
||||
, m_position(ev.position() - target->bounds().origin())
|
||||
, m_position((target ? ev.position() - target->bounds().origin()
|
||||
: ev.position()))
|
||||
, m_ev(ev) {}
|
||||
|
||||
bool handled() const { return m_handled; }
|
||||
|
Loading…
Reference in New Issue
Block a user