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:12 +02:00
1 parent 033192dcc9
commit 93ebb12c58
3 files changed
+3 -3

No files matched your search

@@ -37,7 +37,7 @@ namespace Cthangover.Tools.Tests.Windows
driverQueued = true;
GameLogger.Log("TEST", $"ToolWindowsTestInitializer: activating tool windows test, shots='{shots ?? ""}'");
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new ToolWindowsTestDriverNode(shots));
ModRoot.AddDeferred(new ToolWindowsTestDriverNode(shots));
}
}
}