summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-09 14:25:31 +0200
committerGitHub <noreply@github.com>2019-08-09 14:25:31 +0200
commit7bb2215ed0d7415179a8b59ad4766a3b573cf696 (patch)
tree595b16a4ec53b373d44d59ecfae8bec2bd1aab71 /scene/resources/material.cpp
parent7bc984cd67fbc4a76e107d0e6f7d2c3fa2ba9de7 (diff)
parentaf5e0fff66d55d07a7910bcd7f170da2f952f7cb (diff)
Merge pull request #31213 from KoBeWi/explain_scenes
Replace ERR_EXPLAIN in scene/* code
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r--scene/resources/material.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 44bc862198..daa51aabd7 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -39,10 +39,7 @@
void Material::set_next_pass(const Ref<Material> &p_pass) {
for (Ref<Material> pass_child = p_pass; pass_child != NULL; pass_child = pass_child->get_next_pass()) {
- if (pass_child == this) {
- ERR_EXPLAIN("Can't set as next_pass one of its parents to prevent crashes due to recursive loop.");
- ERR_FAIL_COND(pass_child == this);
- }
+ ERR_FAIL_COND_MSG(pass_child == this, "Can't set as next_pass one of its parents to prevent crashes due to recursive loop.");
}
if (next_pass == p_pass)