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:20 +02:00
1 parent f9bb809ed1
commit 7b699a642b
2 files changed
+3 -4

No files matched your search

@@ -35,7 +35,7 @@ namespace Cthangover.Mods.ScenarioStudio.Tests.Live
driverQueued = true;
GameLogger.Log("TEST", $"StudioLiveTestInitializer: activating studio live test, shots='{shots ?? ""}'");
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new StudioLiveDriverNode(shots));
ModRoot.AddDeferred(new StudioLiveDriverNode(shots));
}
}
}