Statically protect Object::cast_to for unrelated Object types.

Fix a handful of bugs associated with it.
This commit is contained in:
Lukas Tenbrink
2025-10-23 22:30:54 +02:00
parent bbe9654327
commit 0f047944e4
8 changed files with 40 additions and 51 deletions

View File

@@ -497,7 +497,7 @@ void ViewportRotationControl::gui_input(const Ref<InputEvent> &p_event) {
const Ref<InputEventScreenDrag> screen_drag = p_event;
if (screen_drag.is_valid()) {
_process_drag(screen_drag, screen_drag->get_index(), screen_drag->get_position(), screen_drag->get_relative());
_process_drag(nullptr, screen_drag->get_index(), screen_drag->get_position(), screen_drag->get_relative());
}
}