1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Enhance null checking for input event

This commit is contained in:
Nong Van Tinh
2022-11-27 15:01:34 +07:00
parent 4769aa4499
commit ffbaa7fff0
14 changed files with 30 additions and 0 deletions

View File

@@ -746,6 +746,8 @@ Color GraphNode::get_connection_output_color(int p_idx) {
}
void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventMouseButton> mb = p_ev;
if (mb.is_valid()) {
ERR_FAIL_COND_MSG(get_parent_control() == nullptr, "GraphNode must be the child of a GraphEdit node.");