diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-09 18:38:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 18:38:18 +0100 |
commit | 7d9eed093ad918a97b744194bfbba07b36ff6b15 (patch) | |
tree | 9b2a66fa1dea01dd2a1402377663106871e0c6ba /core | |
parent | fa4ddbcb33fc5244e80099bd558e623428e424f5 (diff) | |
parent | 25c4dacb880724a8e5dec88ca922f57215e153ef (diff) |
Merge pull request #45853 from groud/fix_crash_on_exit
Fixes crash when exiting with --verbose with leaked resources
Diffstat (limited to 'core')
-rw-r--r-- | core/io/logger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index da200f5717..bd0285a7a9 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -207,7 +207,7 @@ void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) { Memory::free_static(buf); } - if (p_err || GLOBAL_GET("application/run/flush_stdout_on_print")) { + if (p_err || !ProjectSettings::get_singleton() || GLOBAL_GET("application/run/flush_stdout_on_print")) { // Don't always flush when printing stdout to avoid performance // issues when `print()` is spammed in release builds. file->flush(); @@ -228,7 +228,7 @@ void StdLogger::logv(const char *p_format, va_list p_list, bool p_err) { vfprintf(stderr, p_format, p_list); } else { vprintf(p_format, p_list); - if (GLOBAL_GET("application/run/flush_stdout_on_print")) { + if (!ProjectSettings::get_singleton() || GLOBAL_GET("application/run/flush_stdout_on_print")) { // Don't always flush when printing stdout to avoid performance // issues when `print()` is spammed in release builds. fflush(stdout); |