diff options
author | Marcin Zawiejski <dragmz@gmail.com> | 2018-08-21 00:47:26 +0200 |
---|---|---|
committer | Marcin Zawiejski <dragmz@gmail.com> | 2018-08-21 13:25:50 +0200 |
commit | a1d2fbdeb29dbc0f7fa2940f9f66c161cf723180 (patch) | |
tree | 6e664eff9bccdf5dc42a3a65342fe8cbfa734ff5 /scene/resources/material.cpp | |
parent | 238b70e2db7e376ce8b627bbba5770535270da30 (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.cpp | 2 |
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; |