summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
diff options
context:
space:
mode:
authorMarcin Zawiejski <dragmz@gmail.com>2018-08-21 00:47:26 +0200
committerMarcin Zawiejski <dragmz@gmail.com>2018-08-21 13:25:50 +0200
commita1d2fbdeb29dbc0f7fa2940f9f66c161cf723180 (patch)
tree6e664eff9bccdf5dc42a3a65342fe8cbfa734ff5 /scene/resources/material.cpp
parent238b70e2db7e376ce8b627bbba5770535270da30 (diff)
== and != operators for Ref<T> / T*
This is to prevent crashes for code like: ... void Material::set_next_pass(const Ref<Material> &p_pass) { ERR_FAIL_COND(p_pass == this); ... that's been fixed in 031f763d4fda4e0dbcdf90a170aad3124c50c062
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r--scene/resources/material.cpp2
1 files changed, 1 insertions, 1 deletions
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<Material> &p_pass) {
- ERR_FAIL_COND(p_pass.ptr() == this);
+ ERR_FAIL_COND(p_pass == this);
if (next_pass == p_pass)
return;