From 4939cfecd6516b254dac3c12de9fe6d91e43440d Mon Sep 17 00:00:00 2001 From: iisaev Date: Sat, 24 Oct 2026 11:29:21 +0200 Subject: [PATCH] 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 --- src/PropertyPatchesTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PropertyPatchesTest.cs b/src/PropertyPatchesTest.cs index 011bd14..49c54ef 100644 --- a/src/PropertyPatchesTest.cs +++ b/src/PropertyPatchesTest.cs @@ -29,7 +29,7 @@ namespace Mods.TestDefaultsAndPatches return; queued = true; GameLogger.Log("TEST", "PropertyPatchesTest: activating"); - (Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new PropertyPatchesTestDriverNode()); + ModRoot.AddDeferred(new PropertyPatchesTestDriverNode()); } }