diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index b097a313df1..de3e416d6be 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2175,6 +2175,8 @@ void Tree::_go_down() { } void Tree::_gui_input(Ref p_event) { + ERR_FAIL_COND(p_event.is_null()); + Ref k = p_event; bool is_command = k.is_valid() && k->get_command();