diff options
author | Chaosus <chaosus89@gmail.com> | 2018-08-19 19:40:34 +0300 |
---|---|---|
committer | Chaosus <chaosus89@gmail.com> | 2018-08-19 21:27:09 +0300 |
commit | a6e51c8aa1efe12478613942995e390a8c53a1db (patch) | |
tree | ee6f3900da3b84e46d9bf6294f5d0bb3ba0ffa89 | |
parent | 5d09877da8003740928502aead0b46505495721f (diff) |
Fix crash when setting Material's next pass to itself
-rw-r--r-- | scene/resources/material.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 875b72159a..143a1438ea 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -34,6 +34,8 @@ void Material::set_next_pass(const Ref<Material> &p_pass) { + ERR_FAIL_COND(p_pass == this); + if (next_pass == p_pass) return; |