From 90d0be8fa34f69bd7cf3a40432a2504234fa5797 Mon Sep 17 00:00:00 2001 From: Natalie Martin Date: Thu, 2 Jul 2026 16:52:59 -0500 Subject: [PATCH] Editor: Fix crash in project settings when autoload has been freed The `EditorAutoloadSettings` class does not expect an autoload node to be freed in between its initial instantiation and any calls to `update_autoload()`. But this actually *can* happen if the autoload is an editor script and happens to run something like `queue_free()` shortly after being initialized. When this happens, opening the project settings panel results in a crash, since the editor is trying to locate data such as the node's script after it has already been deleted. To fix this, just verify that the node still exists prior to accessing any of the node's data. --- editor/settings/editor_autoload_settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/settings/editor_autoload_settings.cpp b/editor/settings/editor_autoload_settings.cpp index 4002af86d3c4..ec009df6b1e4 100644 --- a/editor/settings/editor_autoload_settings.cpp +++ b/editor/settings/editor_autoload_settings.cpp @@ -502,7 +502,7 @@ void EditorAutoloadSettings::update_autoload() { if (old_info.path == info.path) { // Still the same resource, check status info.node = old_info.node; - if (info.node) { + if (info.node && info.node->is_instance()) { Ref