Merge pull request #21192 from Chaosus/fix_pass_crash

Fix crash when setting Material's next pass to itself
This commit is contained in:
Rémi Verschelde 2018-08-20 09:13:28 +02:00 committed by GitHub
commit c962f03d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@
void Material::set_next_pass(const Ref<Material> &p_pass) { void Material::set_next_pass(const Ref<Material> &p_pass) {
ERR_FAIL_COND(p_pass == this);
if (next_pass == p_pass) if (next_pass == p_pass)
return; return;