mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-08 22:25:15 +00:00
Fix crashes in *_input functions
This commit is contained in:
@@ -1641,6 +1641,8 @@ void AnimationTimelineEdit::_play_position_draw() {
|
||||
}
|
||||
|
||||
void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
|
||||
ERR_FAIL_COND(p_event.is_null());
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT && hsize_rect.has_point(mb->get_position())) {
|
||||
@@ -2522,6 +2524,8 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
|
||||
}
|
||||
|
||||
void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
|
||||
ERR_FAIL_COND(p_event.is_null());
|
||||
|
||||
if (p_event->is_pressed()) {
|
||||
if (ED_GET_SHORTCUT("animation_editor/duplicate_selection")->is_shortcut(p_event)) {
|
||||
emit_signal("duplicate_request");
|
||||
|
||||
Reference in New Issue
Block a user