Fix empty lines being added for errors with no script backtrace

This commit is contained in:
Mikael Hermansson
2025-05-05 13:27:21 +02:00
parent 1cf573f44d
commit 31b90246e7
12 changed files with 37 additions and 11 deletions

View File

@@ -71,7 +71,9 @@ void IOSTerminalLogger::log_error(const char *p_function, const char *p_file, in
}
for (const Ref<ScriptBacktrace> &backtrace : p_script_backtraces) {
os_log_error(OS_LOG_DEFAULT, "%{public}s", backtrace->format().utf8().get_data());
if (!backtrace->is_empty()) {
os_log_error(OS_LOG_DEFAULT, "%{public}s", backtrace->format().utf8().get_data());
}
}
}