diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2023-01-17 18:43:16 -0500 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2023-01-17 19:12:55 -0500 |
commit | a058cedb532942d5c08ac48f30645478bed8565b (patch) | |
tree | ff8e578d72993c4a90739d18130284be40e10214 /scene/main/viewport.cpp | |
parent | 0ddd9c3e8f9088fa139e25b2903289d727073e12 (diff) |
Fix crash on touch release
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r-- | scene/main/viewport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ef58386b45..9efe649e6f 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1901,7 +1901,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { Control *over = control_id.is_valid() ? Object::cast_to<Control>(ObjectDB::get_instance(control_id)) : nullptr; if (over && over->can_process()) { touch_event = touch_event->xformed_by(Transform2D()); // Make a copy. - pos = gui.last_mouse_focus->get_global_transform_with_canvas().affine_inverse().xform(pos); + pos = over->get_global_transform_with_canvas().affine_inverse().xform(pos); touch_event->set_position(pos); stopped = _gui_call_input(over, touch_event); |