diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-20 09:13:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 09:13:28 +0200 |
commit | c962f03d3705eb31d378df685456cf75f7ed4742 (patch) | |
tree | fba149c6ce63cba5c4918518dfaa80989ef4e110 | |
parent | e746be7aa9e700c9eb0cd6afa2c8620877e8a553 (diff) | |
parent | a6e51c8aa1efe12478613942995e390a8c53a1db (diff) |
Merge pull request #21192 from Chaosus/fix_pass_crash
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; |