From a1d2fbdeb29dbc0f7fa2940f9f66c161cf723180 Mon Sep 17 00:00:00 2001 From: Marcin Zawiejski Date: Tue, 21 Aug 2018 00:47:26 +0200 Subject: == and != operators for Ref / T* This is to prevent crashes for code like: ... void Material::set_next_pass(const Ref &p_pass) { ERR_FAIL_COND(p_pass == this); ... that's been fixed in 031f763d4fda4e0dbcdf90a170aad3124c50c062 --- scene/resources/material.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/resources/material.cpp') diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index d6c22d5664..143a1438ea 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -34,7 +34,7 @@ void Material::set_next_pass(const Ref &p_pass) { - ERR_FAIL_COND(p_pass.ptr() == this); + ERR_FAIL_COND(p_pass == this); if (next_pass == p_pass) return; -- cgit v1.2.3