Use get_node_or_null when null checks are present

Avoids duplicate or unnecessary errors
This commit is contained in:
Ninni Pipping
2023-06-05 14:56:54 +02:00
parent 37d1dfef9d
commit 0c16082e1e
7 changed files with 28 additions and 40 deletions

View File

@ -989,7 +989,7 @@ void GraphEdit::_top_layer_draw() {
_update_scroll();
if (connecting) {
Node *fromn = get_node(NodePath(connecting_from));
Node *fromn = get_node_or_null(NodePath(connecting_from));
ERR_FAIL_NULL(fromn);
GraphNode *from = Object::cast_to<GraphNode>(fromn);
ERR_FAIL_NULL(from);