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:
1 parent
9325bde61b
commit
ac5b21e4c3
1 file changed
+1
-1
@@ -27,7 +27,7 @@ namespace Cthangover.Tools.RpgEditor.Tests
|
||||
.Select(a => a.Substring("--shots=".Length))
|
||||
.FirstOrDefault();
|
||||
GameLogger.Log("TEST", $"RpgEditorTestInitializer: activating rpg_editor_edit, shots={shots ?? "off"}");
|
||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new RpgEditorTestDriver(shots));
|
||||
ModRoot.AddDeferred(new RpgEditorTestDriver(shots));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user