Browse Source

Merge pull request #21192 from Chaosus/fix_pass_crash

Fix crash when setting Material's next pass to itself
Rémi Verschelde 7 years ago
parent
commit
c962f03d37
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scene/resources/material.cpp

+ 2 - 0
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;