From a6e51c8aa1efe12478613942995e390a8c53a1db Mon Sep 17 00:00:00 2001 From: Chaosus Date: Sun, 19 Aug 2018 19:40:34 +0300 Subject: Fix crash when setting Material's next pass to itself --- scene/resources/material.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 &p_pass) { + ERR_FAIL_COND(p_pass == this); + if (next_pass == p_pass) return; -- cgit v1.2.3