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:14 +02:00
1 parent de25a5f19c
commit 10fbfe614c
1 file changed
+1 -1
@@ -45,7 +45,7 @@ namespace Mods.InventoryTest
// Deferred: сцена ещё не готова; драйвер сам ждёт Boot.IsReady и
// появления CurrentScene, поэтому порядок с загрузкой сцены не важен.
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new InventoryTestDriverNode(timeout));
ModRoot.AddDeferred(new InventoryTestDriverNode(timeout));
}
private static float? ParseTimeout(string[] args)