Selaa lähdekoodia

Fix crash when setting Material's next pass to itself

Chaosus 7 vuotta sitten
vanhempi
commit
a6e51c8aa1
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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;