Root nodes join through ModRoot.AddDeferred, so a reload that unloads the mod first never hands Godot a freed node

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cthangoverandClaude Opus 5.5 committed 2026-10-24 11:29:11 +02:00
1 parent 68ed11cadc
commit d1b2cae314
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ namespace Cthangover.Mods.Dialog
// Deferred: OnModResourcesReady fires while the root is still
// setting up autoload children, so a direct AddChild is rejected.
root.CallDeferred("add_child", new DialogScriptRunner { Name = "DialogRunner" });
ModRoot.AddDeferred(new DialogScriptRunner { Name = "DialogRunner" });
}
}
}