diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp index 44ba38236a0..0bd062874e9 100644 --- a/core/string/node_path.cpp +++ b/core/string/node_path.cpp @@ -117,6 +117,12 @@ bool NodePath::operator==(const NodePath &p_path) const { return false; } + if (data->hash_cache_valid && p_path.data->hash_cache_valid) { + if (data->hash_cache != p_path.data->hash_cache) { + return false; + } + } + if (data->absolute != p_path.data->absolute) { return false; }