summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index c34d3da618..22a31d597e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1517,6 +1517,9 @@ bool Main::start() {
ERR_FAIL_COND_V_MSG(script_res.is_null(), false, "Can't load script: " + script);
if (check_only) {
+ if (!script_res->is_valid()) {
+ OS::get_singleton()->set_exit_code(1);
+ }
return false;
}