Fix crash when failing to open log file for writing
(cherry picked from commit 7a5d61816c95c64a905e46480ffec3a5af880a5a)
This commit is contained in:
1 parent
3475e16164
commit
2906aa0e6d
1 file changed
+1
@@ -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.
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user