Fix docking re-anchor crash (#16404)

This commit is contained in:
metalgearsloth 2023-05-14 13:29:50 +10:00 committed by GitHub
parent d1761242e6
commit 295e2620ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -236,10 +236,11 @@ namespace Content.Server.Shuttles.Systems
if (!component.Docked)
return;
var other = Comp<DockingComponent>(component.DockedWith!.Value);
var otherDock = component.DockedWith;
var other = Comp<DockingComponent>(otherDock!.Value);
Undock(uid, component);
Dock(uid, component, component.DockedWith.Value, other);
Dock(uid, component, otherDock.Value, other);
_console.RefreshShuttleConsoles();
}