summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-09-05 18:42:46 +0200
committerMicky <micheledevita2@gmail.com>2022-09-05 18:42:46 +0200
commit19571a8f4440decee57782214463eb29e4eb5639 (patch)
tree6d8207d80b53e6b7a5376f8c80c412b2cdf4b310 /modules/gdscript
parent90801a415314f29eb5c590f85a7751443e54b83a (diff)
Fix "Treat Warnings as Errors" Project Setting not working
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 888cd782fb..eae5b2da3d 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -230,7 +230,7 @@ void GDScriptParser::push_warning(const Node *p_source, GDScriptWarning::Code p_
warning.leftmost_column = p_source->leftmost_column;
warning.rightmost_column = p_source->rightmost_column;
- if (warn_level == GDScriptWarning::WarnLevel::ERROR) {
+ if (warn_level == GDScriptWarning::WarnLevel::ERROR || bool(GLOBAL_GET("debug/gdscript/warnings/treat_warnings_as_errors"))) {
push_error(warning.get_message(), p_source);
return;
}