From 2906aa0e6d9049cc2e968aca1e60132f30eed9f3 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 30 Jul 2026 02:17:40 -0700 Subject: [PATCH] Fix crash when failing to open log file for writing (cherry picked from commit 7a5d61816c95c64a905e46480ffec3a5af880a5a) --- core/io/logger.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/io/logger.cpp b/core/io/logger.cpp index feab968add..2973bd0d46 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -166,6 +166,7 @@ void RotatedFileLogger::rotate_file() { } file = FileAccess::open(base_path, FileAccess::WRITE); + ERR_FAIL_COND_MSG(file.is_null(), "Failed to open log file for writing: " + base_path); file->detach_from_objectdb(); // Note: This FileAccess instance will exist longer than ObjectDB, therefore can't be registered in ObjectDB. }